package com.sdp.irrigation.utils;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.regex.*;

public class VarcharModifier {
    public static void main(String[] args) {
        String inputSql = "CREATE TABLE IF NOT EXISTS `ygt_db`.`cehr_patient` (\r\n" + 
        		"  `id` bigint  NOT NULL COMMENT 'ID',\r\n" + 
        		"  `org_id` bigint NULL COMMENT '机构标识',\r\n" + 
        		"  `org_code` varchar(50)  NOT NULL COMMENT '机构编码',\r\n" + 
        		"  `org_name` varchar(50)  NOT NULL COMMENT '机构名称',\r\n" + 
        		"  `patient_id` varchar(128)  NOT NULL COMMENT '患者ID',\r\n" + 
        		"  `health_card_no` varchar(36)  NOT NULL COMMENT '居民健康卡号',\r\n" + 
        		"  `card_type_code` varchar(2)  NOT NULL COMMENT '就诊卡类型代码',\r\n" + 
        		"  `card_type_name` varchar(128)  NOT NULL COMMENT '就诊卡类型名称',\r\n" + 
        		"  `name` varchar(128)  NOT NULL COMMENT '姓名',\r\n" + 
        		"  `sex_code` varchar(1)  NOT NULL COMMENT '性别代码',\r\n" + 
        		"  `gender` varchar(30)  NOT NULL COMMENT '性别',\r\n" + 
        		"  `birth_date` datetime  NOT NULL COMMENT '出生日期',\r\n" + 
        		"  `nationality_code` varchar(2)  NOT NULL COMMENT '民族代码',\r\n" + 
        		"  `nationality` varchar(30)  NOT NULL COMMENT '民族',\r\n" + 
        		"  `id_type_code` varchar(2)  NOT NULL COMMENT '身份证件类别代码',\r\n" + 
        		"  `id_type_name` varchar(50)  NOT NULL COMMENT '身份证件类别名称',\r\n" + 
        		"  `id_no` varchar(128)  NOT NULL COMMENT '身份证件号码',\r\n" + 
        		"  `marriage_code` varchar(2) NULL COMMENT '婚姻状况代码',\r\n" + 
        		"  `marriage` varchar(10) NULL COMMENT '婚姻状况',\r\n" + 
        		"  `poor_mark` varchar(2) NULL COMMENT '建档立卡贫困人口标识',\r\n" + 
        		"  `employer_name` varchar(70) NULL COMMENT '工作单位名称',\r\n" + 
        		"  `employer_tel_no` varchar(128) NULL COMMENT '工作单位电话号码',\r\n" + 
        		"  `contact_name` varchar(128) NULL COMMENT '联系人-姓名',\r\n" + 
        		"  `contact_tel_no` varchar(128) NULL COMMENT '联系人-电话',\r\n" + 
        		"  `abo_code` varchar(1) NULL COMMENT 'ABO血型代码',\r\n" + 
        		"  `abo_name` varchar(10) NULL COMMENT 'ABO血型名称',\r\n" + 
        		"  `rh_code` varchar(1) NULL COMMENT 'Rh血型代码',\r\n" + 
        		"  `rh_name` varchar(10) NULL COMMENT 'Rh血型名称',\r\n" + 
        		"  `education_code` varchar(5) NULL COMMENT '学历代码',\r\n" + 
        		"  `education_name` varchar(10) NULL COMMENT '学历名称',\r\n" + 
        		"  `drug_allergy_mark` varchar(1) NULL COMMENT '药物过敏史标志',\r\n" + 
        		"  `op_history_mark` varchar(1) NULL COMMENT '手术史标志',\r\n" + 
        		"  `trauma_history_mark` varchar(1) NULL COMMENT '外伤史标志',\r\n" + 
        		"  `blood_transf_mark` varchar(1) NULL COMMENT '输血史标志',\r\n" + 
        		"  `genetic_disease_history` varchar(1000) NULL COMMENT '遗传性疾病史',\r\n" + 
        		"  `operation_history` varchar(1000) NULL COMMENT '手术史',\r\n" + 
        		"  `sec_type_code` varchar(2)  NOT NULL COMMENT '医疗保险类别代码',\r\n" + 
        		"  `sec_type` varchar(32) NULL COMMENT '医疗保险类别',\r\n" + 
        		"  `native` varchar(512) NULL COMMENT '籍贯',\r\n" + 
        		"  `address` varchar(512) NULL COMMENT '住址',\r\n" + 
        		"  `postal_code` varchar(6) NULL COMMENT '邮政编码',\r\n" + 
        		"  `tel_no` varchar(128) NULL COMMENT '本人电话号码',\r\n" + 
        		"  `occupation_code` varchar(30) NULL COMMENT '职业类别代码',\r\n" + 
        		"  `occupation_name` varchar(200) NULL COMMENT '职业类别',\r\n" + 
        		"  `email` varchar(128) NULL COMMENT '电子邮件地址',\r\n" + 
        		"  `province` varchar(70) NULL COMMENT '省',\r\n" + 
        		"  `city` varchar(70) NULL COMMENT '市',\r\n" + 
        		"  `county` varchar(70) NULL COMMENT '县',\r\n" + 
        		"  `town` varchar(70) NULL COMMENT '乡',\r\n" + 
        		"  `village` varchar(70) NULL COMMENT '村',\r\n" + 
        		"  `house_no` varchar(70) NULL COMMENT '门牌号码',\r\n" + 
        		"  `state` int  NULL COMMENT '状态',\r\n" + 
        		"  `deleted` boolean  NULL COMMENT '删除标识',\r\n" + 
        		"  `create_by` bigint  NULL COMMENT '创建人',\r\n" + 
        		"  `create_time` datetime  NULL COMMENT '创建时间',\r\n" + 
        		"  `update_by` bigint  NULL COMMENT '修改人',\r\n" + 
        		"  `update_time` datetime  NOT NULL COMMENT '修改时间',\r\n" + 
        		"  `business_time` datetime  NOT NULL COMMENT '业务时间'\r\n" + 
        		") ENGINE=OLAP \r\n" + 
        		"UNIQUE KEY(`id`) \r\n" + 
        		"COMMENT '患者信息' \r\n" + 
        		"DISTRIBUTED BY HASH(`id`) BUCKETS 10 \r\n" + 
        		"PROPERTIES ( \r\n" + 
        		"\"replication_allocation\" = \"tag.location.default: 1\", \r\n" + 
        		"\"is_being_synced\" = \"false\", \r\n" + 
        		"\"storage_format\" = \"V2\", \r\n" + 
        		"\"light_schema_change\" = \"true\", \r\n" + 
        		"\"disable_auto_compaction\" = \"false\", \r\n" + 
        		"\"enable_single_replica_compaction\" = \"false\");\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"CREATE TABLE IF NOT EXISTS `ygt_db`.`cehr_patient_address` (\r\n" + 
        		"  `id` bigint  NOT NULL COMMENT 'ID',\r\n" + 
        		"  `org_id` bigint NULL COMMENT '机构标识',\r\n" + 
        		"  `org_code` varchar(50)  NOT NULL COMMENT '机构编码',\r\n" + 
        		"  `org_name` varchar(50)  NOT NULL COMMENT '机构名称',\r\n" + 
        		"  `patient_id` varchar(128)  NOT NULL COMMENT '病人ID',\r\n" + 
        		"  `address_type_code` varchar(128)  NOT NULL COMMENT '地址类别代码',\r\n" + 
        		"  `addr_province` varchar(200) NULL COMMENT '地址-省（自治区、直辖市）',\r\n" + 
        		"  `addr_city` varchar(200) NULL COMMENT '地址-市（地区、州）',\r\n" + 
        		"  `addr_county` varchar(200) NULL COMMENT '地址-县（区）',\r\n" + 
        		"  `addr_town` varchar(200) NULL COMMENT '地址-乡（镇、街道办事处）',\r\n" + 
        		"  `addr_village` varchar(200) NULL COMMENT '地址-村（街、路、弄等）',\r\n" + 
        		"  `addr_house_no` varchar(200) NULL COMMENT '地址-门牌号码',\r\n" + 
        		"  `postal_code` varchar(6) NULL COMMENT '邮政编码',\r\n" + 
        		"  `state` int  NULL COMMENT '状态',\r\n" + 
        		"  `deleted` boolean  NULL COMMENT '删除标识',\r\n" + 
        		"  `create_by` bigint  NULL COMMENT '创建人',\r\n" + 
        		"  `create_time` datetime  NULL COMMENT '创建时间',\r\n" + 
        		"  `update_by` bigint  NULL COMMENT '修改人',\r\n" + 
        		"  `update_time` datetime  NOT NULL COMMENT '修改时间',\r\n" + 
        		"  `business_time` datetime  NOT NULL COMMENT '业务时间'\r\n" + 
        		") ENGINE=OLAP \r\n" + 
        		"UNIQUE KEY(`id`) \r\n" + 
        		"COMMENT '患者地址信息' \r\n" + 
        		"DISTRIBUTED BY HASH(`id`) BUCKETS 10 \r\n" + 
        		"PROPERTIES ( \r\n" + 
        		"\"replication_allocation\" = \"tag.location.default: 1\", \r\n" + 
        		"\"is_being_synced\" = \"false\", \r\n" + 
        		"\"storage_format\" = \"V2\", \r\n" + 
        		"\"light_schema_change\" = \"true\", \r\n" + 
        		"\"disable_auto_compaction\" = \"false\", \r\n" + 
        		"\"enable_single_replica_compaction\" = \"false\");\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"CREATE TABLE IF NOT EXISTS `ygt_db`.`cehr_active_patient` (\r\n" + 
        		"  `id` bigint  NOT NULL COMMENT 'ID',\r\n" + 
        		"  `org_id` bigint NULL COMMENT '机构标识',\r\n" + 
        		"  `org_code` varchar(50)  NOT NULL COMMENT '机构编码',\r\n" + 
        		"  `org_name` varchar(50)  NOT NULL COMMENT '机构名称',\r\n" + 
        		"  `patient_id` varchar(128)  NOT NULL COMMENT '患者ID',\r\n" + 
        		"  `name` varchar(40)  NOT NULL COMMENT '患者姓名',\r\n" + 
        		"  `event_type` smallint  NOT NULL COMMENT '事件类型',\r\n" + 
        		"  `event_type_name` varchar(10)  NOT NULL COMMENT '时间类型名称',\r\n" + 
        		"  `event_no` varchar(128)  NOT NULL COMMENT '事件号',\r\n" + 
        		"  `emergency_signs` varchar(1)  NOT NULL COMMENT '急诊标识',\r\n" + 
        		"  `retrieve_date` datetime  NOT NULL COMMENT '归档检索日期',\r\n" + 
        		"  `start_date` datetime  NOT NULL COMMENT '开始日期',\r\n" + 
        		"  `end_date` datetime NULL COMMENT '结束日期',\r\n" + 
        		"  `fee_amount` decimal(12,4)  NOT NULL COMMENT '总费用',\r\n" + 
        		"  `icd_code` varchar(128)  NOT NULL COMMENT '主诊断icd',\r\n" + 
        		"  `diagnosis_name` varchar(256)  NOT NULL COMMENT '主诊断',\r\n" + 
        		"  `address_code` varchar(128) NULL COMMENT '现住址编码',\r\n" + 
        		"  `address` varchar(256) NULL COMMENT '详细现住址',\r\n" + 
        		"  `tel_no` varchar(16) NULL COMMENT '本人电话号码',\r\n" + 
        		"  `marriage_code` varchar(2) NULL COMMENT '婚姻状况代码',\r\n" + 
        		"  `marriage` varchar(10) NULL COMMENT '婚姻状况',\r\n" + 
        		"  `onset_dtime` datetime NULL COMMENT '发病日期时间',\r\n" + 
        		"  `diagnosis_date` datetime  NOT NULL COMMENT '主诊断日期',\r\n" + 
        		"  `id_type_code` varchar(2)  NOT NULL COMMENT '身份证件类别代码',\r\n" + 
        		"  `id_type_name` varchar(20)  NOT NULL COMMENT '身份证件类别名称',\r\n" + 
        		"  `id_no` varchar(128)  NOT NULL COMMENT '身份证件号码',\r\n" + 
        		"  `guard_name` varchar(40) NULL COMMENT '陪伴者姓名',\r\n" + 
        		"  `relat_code` varchar(2) NULL COMMENT '陪伴者与本人关系编码',\r\n" + 
        		"  `relat_name` varchar(16) NULL COMMENT '陪伴者与本人关系名称',\r\n" + 
        		"  `init_subs_mark` varchar(1) NULL COMMENT '初诊/复诊类别代码',\r\n" + 
        		"  `init_subs_mark_name` varchar(2) NULL COMMENT '初诊/复诊类别名称',\r\n" + 
        		"  `dept_code` varchar(9) NULL COMMENT '就诊科室编码',\r\n" + 
        		"  `dept_name` varchar(40) NULL COMMENT '就诊科室名称',\r\n" + 
        		"  `if_covid_19` varchar(1) NULL COMMENT '是否患过新冠肺炎',\r\n" + 
        		"  `is_observe` varchar(1) NULL COMMENT '是否留院观察',\r\n" + 
        		"  `internet_mark` varchar(1) NULL COMMENT '互联网就诊标识',\r\n" + 
        		"  `doctor_ic_no` varchar(18) NULL COMMENT '就诊医师身份证号',\r\n" + 
        		"  `doctor_code` varchar(30)  NOT NULL COMMENT '就诊医师代码',\r\n" + 
        		"  `doctor_name` varchar(40)  NOT NULL COMMENT '就诊医师姓名',\r\n" + 
        		"  `state` int  NULL COMMENT '状态',\r\n" + 
        		"  `deleted` boolean  NULL COMMENT '删除标识',\r\n" + 
        		"  `create_by` bigint  NULL COMMENT '创建人',\r\n" + 
        		"  `create_time` datetime  NULL COMMENT '创建时间',\r\n" + 
        		"  `update_by` bigint  NULL COMMENT '修改人',\r\n" + 
        		"  `update_time` datetime  NOT NULL COMMENT '修改时间',\r\n" + 
        		"  `business_time` datetime  NOT NULL COMMENT '业务时间'\r\n" + 
        		") ENGINE=OLAP \r\n" + 
        		"UNIQUE KEY(`id`) \r\n" + 
        		"COMMENT '就诊记录' \r\n" + 
        		"DISTRIBUTED BY HASH(`id`) BUCKETS 10 \r\n" + 
        		"PROPERTIES ( \r\n" + 
        		"\"replication_allocation\" = \"tag.location.default: 1\", \r\n" + 
        		"\"is_being_synced\" = \"false\", \r\n" + 
        		"\"storage_format\" = \"V2\", \r\n" + 
        		"\"light_schema_change\" = \"true\", \r\n" + 
        		"\"disable_auto_compaction\" = \"false\", \r\n" + 
        		"\"enable_single_replica_compaction\" = \"false\");\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"CREATE TABLE IF NOT EXISTS `ygt_db`.`outpatient_registered` (\r\n" + 
        		"  `id` bigint  NOT NULL COMMENT 'ID',\r\n" + 
        		"  `org_id` bigint NULL COMMENT '机构标识',\r\n" + 
        		"  `org_code` varchar(50)  NOT NULL COMMENT '机构编码',\r\n" + 
        		"  `org_name` varchar(50)  NOT NULL COMMENT '机构名称',\r\n" + 
        		"  `patient_id` varchar(128) NULL COMMENT '患者ID',\r\n" + 
        		"  `outpat_form_no` varchar(128) NULL COMMENT '门诊记录表编号',\r\n" + 
        		"  `id_type_code` varchar(2)  NOT NULL COMMENT '身份证件类别代码',\r\n" + 
        		"  `id_type_name` varchar(20)  NOT NULL COMMENT '身份证件类别名称',\r\n" + 
        		"  `id_no` varchar(128)  NOT NULL COMMENT '身份证件号码',\r\n" + 
        		"  `name` varchar(40)  NOT NULL COMMENT '患者姓名',\r\n" + 
        		"  `sex_code` varchar(1)  NOT NULL COMMENT '性别代码',\r\n" + 
        		"  `gender` varchar(10)  NOT NULL COMMENT '性别',\r\n" + 
        		"  `birth_date` datetime  NOT NULL COMMENT '出生日期',\r\n" + 
        		"  `mobile` varchar(16) NULL COMMENT '联系电话',\r\n" + 
        		"  `nationality_code` varchar(2)  NOT NULL COMMENT '民族代码',\r\n" + 
        		"  `nationality` varchar(10)  NOT NULL COMMENT '民族',\r\n" + 
        		"  `occupation_code` varchar(30) NULL COMMENT '职业类别代码',\r\n" + 
        		"  `occupation_name` varchar(200) NULL COMMENT '职业类别',\r\n" + 
        		"  `marriage_code` varchar(2) NULL COMMENT '婚姻状况代码',\r\n" + 
        		"  `marriage` varchar(10) NULL COMMENT '婚姻状况',\r\n" + 
        		"  `guard_name` varchar(4) NULL COMMENT '陪伴者姓名',\r\n" + 
        		"  `relat_code` varchar(2) NULL COMMENT '陪伴者与本人关系编码',\r\n" + 
        		"  `relat_name` varchar(16) NULL COMMENT '陪伴者与本人关系名称',\r\n" + 
        		"  `organ_code` varchar(18)  NOT NULL COMMENT '就诊医疗机构编码',\r\n" + 
        		"  `organ_name` varchar(50)  NOT NULL COMMENT '就诊医疗机构名称',\r\n" + 
        		"  `dept_code` varchar(9)  NOT NULL COMMENT '就诊科室编码',\r\n" + 
        		"  `dept_name` varchar(4)  NOT NULL COMMENT '就诊科室名称',\r\n" + 
        		"  `no_class` varchar(1) NULL COMMENT '挂号别分类代码',\r\n" + 
        		"  `no_class_name` varchar(10) NULL COMMENT '挂号别分类名称',\r\n" + 
        		"  `reg_way` varchar(2) NULL COMMENT '挂号方式代码',\r\n" + 
        		"  `reg_way_name` varchar(10) NULL COMMENT '挂号方式名称',\r\n" + 
        		"  `doctor_ic_no` varchar(18) NULL COMMENT '医师身份证号',\r\n" + 
        		"  `doctor_code` varchar(30)  NOT NULL COMMENT '医师代码',\r\n" + 
        		"  `doctor_name` varchar(40)  NOT NULL COMMENT '医师姓名',\r\n" + 
        		"  `reg_type_code` varchar(2)  NOT NULL COMMENT '挂号方式代码',\r\n" + 
        		"  `reg_type_name` varchar(50)  NOT NULL COMMENT '挂号方式名称',\r\n" + 
        		"  `order_time` datetime NULL COMMENT '预约日期时间',\r\n" + 
        		"  `register_time` datetime  NOT NULL COMMENT '挂号日期时间',\r\n" + 
        		"  `visit_dtime` datetime  NOT NULL COMMENT '就诊日期时间',\r\n" + 
        		"  `visit_time_period` varchar(1) NULL COMMENT '就诊时段',\r\n" + 
        		"  `visit_time_period_name` varchar(10) NULL COMMENT '就诊时段名称',\r\n" + 
        		"  `queue_number` int NULL COMMENT '门诊/急诊顺序号',\r\n" + 
        		"  `app_mark` varchar(1) NULL COMMENT '预约挂号标志代码',\r\n" + 
        		"  `internet_mark` varchar(1) NULL COMMENT '互联网挂号标志',\r\n" + 
        		"  `reg_fee` decimal(12,4)  NOT NULL COMMENT '挂号费',\r\n" + 
        		"  `other_fee` decimal(12,4)  NOT NULL COMMENT '其他费',\r\n" + 
        		"  `regi_fee` decimal(12,4)  NOT NULL COMMENT '诊察费用',\r\n" + 
        		"  `ind_pay` decimal(12,4) NULL COMMENT '个人支付诊察费用',\r\n" + 
        		"  `visit_status` varchar(1) NULL COMMENT '就诊状态',\r\n" + 
        		"  `visit_status_name` varchar(3) NULL COMMENT '就诊状态名称',\r\n" + 
        		"  `back_mark` varchar(1) NULL COMMENT '退号标识代码',\r\n" + 
        		"  `back_mark_name` varchar(4) NULL COMMENT '退号标识名称',\r\n" + 
        		"  `rec_id_no` varchar(18) NULL COMMENT '挂号员身份证号',\r\n" + 
        		"  `rec_name` varchar(40) NULL COMMENT '挂号员姓名',\r\n" + 
        		"  `rec_dtime` datetime NULL COMMENT '记录日期时间',\r\n" + 
        		"  `state` int  NULL COMMENT '状态',\r\n" + 
        		"  `deleted` boolean  NULL COMMENT '删除标识',\r\n" + 
        		"  `create_by` bigint  NULL COMMENT '创建人',\r\n" + 
        		"  `create_time` datetime  NULL COMMENT '创建时间',\r\n" + 
        		"  `update_by` bigint  NULL COMMENT '修改人',\r\n" + 
        		"  `update_time` datetime  NOT NULL COMMENT '修改时间',\r\n" + 
        		"  `business_time` datetime  NOT NULL COMMENT '业务时间'\r\n" + 
        		") ENGINE=OLAP \r\n" + 
        		"UNIQUE KEY(`id`) \r\n" + 
        		"COMMENT '门急诊挂号信息' \r\n" + 
        		"DISTRIBUTED BY HASH(`id`) BUCKETS 10 \r\n" + 
        		"PROPERTIES ( \r\n" + 
        		"\"replication_allocation\" = \"tag.location.default: 1\", \r\n" + 
        		"\"is_being_synced\" = \"false\", \r\n" + 
        		"\"storage_format\" = \"V2\", \r\n" + 
        		"\"light_schema_change\" = \"true\", \r\n" + 
        		"\"disable_auto_compaction\" = \"false\", \r\n" + 
        		"\"enable_single_replica_compaction\" = \"false\");\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"CREATE TABLE IF NOT EXISTS `ygt_db`.`outpatient` (\r\n" + 
        		"  `id` bigint  NOT NULL COMMENT 'ID',\r\n" + 
        		"  `org_id` bigint NULL COMMENT '机构标识',\r\n" + 
        		"  `org_code` varchar(50)  NOT NULL COMMENT '机构编码',\r\n" + 
        		"  `org_name` varchar(50)  NOT NULL COMMENT '机构名称',\r\n" + 
        		"  `patient_id` varchar(128)  NOT NULL COMMENT '患者ID',\r\n" + 
        		"  `outpat_form_no` varchar(128)  NOT NULL COMMENT '门诊记录表编号',\r\n" + 
        		"  `id_type_code` varchar(2)  NOT NULL COMMENT '身份证件类别代码',\r\n" + 
        		"  `id_type_name` varchar(20)  NOT NULL COMMENT '身份证件类别名称',\r\n" + 
        		"  `id_no` varchar(128)  NOT NULL COMMENT '身份证件号码',\r\n" + 
        		"  `name` varchar(40)  NOT NULL COMMENT '病人姓名',\r\n" + 
        		"  `health_card_no` varchar(36) NULL COMMENT '居民健康卡号',\r\n" + 
        		"  `age_year` smallint NULL COMMENT '年龄(岁)',\r\n" + 
        		"  `age_month` varchar(8) NULL COMMENT '年龄(月)',\r\n" + 
        		"  `age` smallint NULL COMMENT '年龄',\r\n" + 
        		"  `age_unit_code` varchar(1) NULL COMMENT '年龄单位代码',\r\n" + 
        		"  `age_unit_name` varchar(20) NULL COMMENT '年龄单位名称',\r\n" + 
        		"  `current_disease` varchar(2000) NULL COMMENT '现病史',\r\n" + 
        		"  `disease_history` varchar(2000) NULL COMMENT '既往史',\r\n" + 
        		"  `visit_org_code` varchar(18) NULL COMMENT '就诊机构代码',\r\n" + 
        		"  `visit_org_name` varchar(50) NULL COMMENT '就诊机构名称',\r\n" + 
        		"  `visit_dept_code` varchar(9) NULL COMMENT '就诊科室代码',\r\n" + 
        		"  `visit_dept_name` varchar(40)  NOT NULL COMMENT '就诊科室名称',\r\n" + 
        		"  `dept_code` varchar(30)  NOT NULL COMMENT '院内科室代码',\r\n" + 
        		"  `std_dept_code` varchar(30) NULL COMMENT '标准科室编码',\r\n" + 
        		"  `reg_time` datetime NULL COMMENT '挂号时间',\r\n" + 
        		"  `visit_dtime` datetime NULL COMMENT '就诊日期时间',\r\n" + 
        		"  `referral_mark` varchar(1) NULL COMMENT '转诊标志',\r\n" + 
        		"  `chief_complaints` varchar(2000) NULL COMMENT '主诉',\r\n" + 
        		"  `symptom` varchar(200) NULL COMMENT '症状名称',\r\n" + 
        		"  `symptom_code` varchar(50) NULL COMMENT '症状名称代码',\r\n" + 
        		"  `health_service_demand` varchar(200) NULL COMMENT '卫生服务要求',\r\n" + 
        		"  `health_problem_eval` varchar(200) NULL COMMENT '健康问题评估',\r\n" + 
        		"  `treatment_plan` varchar(200) NULL COMMENT '处置计划',\r\n" + 
        		"  `other_medical_treatment` varchar(200) NULL COMMENT '其他医学处置',\r\n" + 
        		"  `resp_doctor_code` varchar(30)  NOT NULL COMMENT '责任医师代码',\r\n" + 
        		"  `resp_doctor_name` varchar(40)  NOT NULL COMMENT '责任医师姓名',\r\n" + 
        		"  `sbp` smallint NULL COMMENT '收缩压(mmHg)',\r\n" + 
        		"  `dbp` smallint NULL COMMENT '舒张压(mmHg)',\r\n" + 
        		"  `doctor_code` varchar(30) NULL COMMENT '医生代码',\r\n" + 
        		"  `doctor_name` varchar(40) NULL COMMENT '医生姓名',\r\n" + 
        		"  `doctor_title_code` varchar(128) NULL COMMENT '医生职称代码',\r\n" + 
        		"  `doctor_title_name` varchar(10) NULL COMMENT '医生职称',\r\n" + 
        		"  `doctor_post_code` varchar(1) NULL COMMENT '医生职务代码',\r\n" + 
        		"  `doctor_post_name` varchar(32) NULL COMMENT '医生职务名称',\r\n" + 
        		"  `reg_type_code` varchar(2) NULL COMMENT '挂号类别代码',\r\n" + 
        		"  `reg_type` varchar(10)  NOT NULL COMMENT '挂号类别',\r\n" + 
        		"  `no_class` varchar(1) NULL COMMENT '挂号别分类代码',\r\n" + 
        		"  `no_class_name` varchar(10) NULL COMMENT '挂号别分类名称',\r\n" + 
        		"  `reg_way` varchar(1) NULL COMMENT '挂号方式代码',\r\n" + 
        		"  `reg_way_name` varchar(10) NULL COMMENT '挂号方式名称',\r\n" + 
        		"  `reg_book_way` varchar(1) NULL COMMENT '预约途径代码',\r\n" + 
        		"  `reg_book_way_name` varchar(10) NULL COMMENT '预约途径名称',\r\n" + 
        		"  `pay_way_code` varchar(2)  NOT NULL COMMENT '医疗付款方式代码',\r\n" + 
        		"  `pay_way_name` varchar(20) NULL COMMENT '医疗付款方式',\r\n" + 
        		"  `sec_type_code` varchar(2)  NOT NULL COMMENT '保险类型代码',\r\n" + 
        		"  `sec_type_name` varchar(20)  NOT NULL COMMENT '保险类型名称',\r\n" + 
        		"  `sec_no` varchar(128) NULL COMMENT '医疗保险号',\r\n" + 
        		"  `is_local_mark` varchar(1) NULL COMMENT '本地标志',\r\n" + 
        		"  `use_med_mark` varchar(1) NULL COMMENT '用药标识',\r\n" + 
        		"  `consult_question` varchar(200) NULL COMMENT '咨询问题',\r\n" + 
        		"  `valid_time_num` smallint NULL COMMENT '挂号有效时间',\r\n" + 
        		"  `visit_first_flag` varchar(1) NULL COMMENT '初次就诊',\r\n" + 
        		"  `emergency_mark` varchar(1) NULL COMMENT '是否急诊',\r\n" + 
        		"  `critical_mark` varchar(1) NULL COMMENT '是否危重',\r\n" + 
        		"  `reservation_flag` varchar(1) NULL COMMENT '预约就诊',\r\n" + 
        		"  `state` int NULL COMMENT '状态',\r\n" + 
        		"  `deleted` boolean NULL COMMENT '删除标识',\r\n" + 
        		"  `create_by` bigint NULL COMMENT '创建人',\r\n" + 
        		"  `create_time` datetime NULL COMMENT '创建时间',\r\n" + 
        		"  `update_by` bigint NULL COMMENT '修改人',\r\n" + 
        		"  `update_time` datetime  NOT NULL COMMENT '修改时间',\r\n" + 
        		"  `business_time` datetime  NOT NULL COMMENT '业务时间'\r\n" + 
        		") ENGINE=OLAP \r\n" + 
        		"UNIQUE KEY(`id`) \r\n" + 
        		"COMMENT '门诊摘要信息' \r\n" + 
        		"DISTRIBUTED BY HASH(`id`) BUCKETS 10 \r\n" + 
        		"PROPERTIES ( \r\n" + 
        		"\"replication_allocation\" = \"tag.location.default: 1\", \r\n" + 
        		"\"is_being_synced\" = \"false\", \r\n" + 
        		"\"storage_format\" = \"V2\", \r\n" + 
        		"\"light_schema_change\" = \"true\", \r\n" + 
        		"\"disable_auto_compaction\" = \"false\", \r\n" + 
        		"\"enable_single_replica_compaction\" = \"false\");\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"CREATE TABLE IF NOT EXISTS `ygt_db`.`outpatient_diagnosis` (\r\n" + 
        		"  `id` bigint  NOT NULL COMMENT 'ID',\r\n" + 
        		"  `org_id` bigint NULL COMMENT '机构标识',\r\n" + 
        		"  `org_code` varchar(50)  NOT NULL COMMENT '机构编码',\r\n" + 
        		"  `org_name` varchar(50)  NOT NULL COMMENT '机构名称',\r\n" + 
        		"  `health_card_no` varchar(36) NULL COMMENT '居民健康卡号',\r\n" + 
        		"  `outpat_form_no` varchar(128) NULL COMMENT '门诊记录表编号',\r\n" + 
        		"  `id_type_code` varchar(2)  NOT NULL COMMENT '身份证件类别代码',\r\n" + 
        		"  `id_type_name` varchar(20)  NOT NULL COMMENT '身份证件类别名称',\r\n" + 
        		"  `id_no` varchar(128)  NOT NULL COMMENT '身份证件号码',\r\n" + 
        		"  `outpat_diag_name` varchar(50) NULL COMMENT '门诊诊断名称',\r\n" + 
        		"  `outpat_diag_code` varchar(5) NULL COMMENT '门诊诊断代码',\r\n" + 
        		"  `diag_date` datetime NULL COMMENT '诊断日期',\r\n" + 
        		"  `diag_type` varchar(1)  NOT NULL COMMENT '中西医诊断标识代码',\r\n" + 
        		"  `diag_type_name` varchar(10) NULL COMMENT '中西医诊断标识名称',\r\n" + 
        		"  `diag_type_code` varchar(2) NULL COMMENT '诊断类型代码',\r\n" + 
        		"  `diag_type_code_name` varchar(20) NULL COMMENT '诊断类型',\r\n" + 
        		"  `infect_flag` varchar(1)  NOT NULL COMMENT '传染标志',\r\n" + 
        		"  `infect_report_flag` varchar(1)  NOT NULL COMMENT '传染上报标志',\r\n" + 
        		"  `mast_mark` varchar(1)  NOT NULL COMMENT '主要诊断标志',\r\n" + 
        		"  `diagnosis_order` smallint NULL COMMENT '诊断顺序码',\r\n" + 
        		"  `diag_doctor_code` varchar(30) NULL COMMENT '诊断医生ID',\r\n" + 
        		"  `diag_doctor_name` varchar(40) NULL COMMENT '诊断医生姓名',\r\n" + 
        		"  `state` int NULL COMMENT '状态',\r\n" + 
        		"  `deleted` boolean NULL COMMENT '删除标识',\r\n" + 
        		"  `create_by` bigint NULL COMMENT '创建人',\r\n" + 
        		"  `create_time` datetime NULL COMMENT '创建时间',\r\n" + 
        		"  `update_by` bigint NULL COMMENT '修改人',\r\n" + 
        		"  `update_time` datetime  NOT NULL COMMENT '修改时间',\r\n" + 
        		"  `business_time` datetime  NOT NULL COMMENT '业务时间'\r\n" + 
        		") ENGINE=OLAP \r\n" + 
        		"UNIQUE KEY(`id`) \r\n" + 
        		"COMMENT '门诊诊断' \r\n" + 
        		"DISTRIBUTED BY HASH(`id`) BUCKETS 10 \r\n" + 
        		"PROPERTIES ( \r\n" + 
        		"\"replication_allocation\" = \"tag.location.default: 1\", \r\n" + 
        		"\"is_being_synced\" = \"false\", \r\n" + 
        		"\"storage_format\" = \"V2\", \r\n" + 
        		"\"light_schema_change\" = \"true\", \r\n" + 
        		"\"disable_auto_compaction\" = \"false\", \r\n" + 
        		"\"enable_single_replica_compaction\" = \"false\");\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"CREATE TABLE IF NOT EXISTS `ygt_db`.`outpatient_drug` (\r\n" + 
        		"  `id` bigint  NOT NULL COMMENT 'ID',\r\n" + 
        		"  `org_id` bigint NULL COMMENT '机构标识',\r\n" + 
        		"  `org_code` varchar(50)  NOT NULL COMMENT '机构编码',\r\n" + 
        		"  `org_name` varchar(50)  NOT NULL COMMENT '机构名称',\r\n" + 
        		"  `health_card_no` varchar(36) NULL COMMENT '居民健康卡号',\r\n" + 
        		"  `outpat_form_no` varchar(128) NULL COMMENT '门诊记录表编号',\r\n" + 
        		"  `id_type_code` varchar(2)  NOT NULL COMMENT '身份证件类别代码',\r\n" + 
        		"  `id_type_name` varchar(20)  NOT NULL COMMENT '身份证件类别名称',\r\n" + 
        		"  `id_no` varchar(128)  NOT NULL COMMENT '身份证件号码',\r\n" + 
        		"  `fadvice_id` bigint NULL COMMENT '门诊医嘱标识',\r\n" + 
        		"  `drug_category` varchar(64) NULL COMMENT '药物种类',\r\n" + 
        		"  `drug_category_code` varchar(64) NULL COMMENT '药物种类代码',\r\n" + 
        		"  `cn_medicine_type_code` varchar(1) NULL COMMENT '中药类别代码',\r\n" + 
        		"  `cn_medicine_type_name` varchar(10) NULL COMMENT '中药类别名称',\r\n" + 
        		"  `drug_type_code` varchar(7)  NOT NULL COMMENT '药物类型代码',\r\n" + 
        		"  `drug_type_name` varchar(30)  NOT NULL COMMENT '药物类型名称',\r\n" + 
        		"  `drug_local_code` varchar(50)  NOT NULL COMMENT '药物院内编码',\r\n" + 
        		"  `drug_name` varchar(200)  NOT NULL COMMENT '药物名称',\r\n" + 
        		"  `curr_drug_name` varchar(50) NULL COMMENT '药品商品名',\r\n" + 
        		"  `drug_std_name` varchar(200)  NOT NULL COMMENT '药物标准名称',\r\n" + 
        		"  `drug_std_code` varchar(50)  NOT NULL COMMENT '药物标准编码',\r\n" + 
        		"  `drug_basic_code` varchar(12) NULL COMMENT '药物本位码',\r\n" + 
        		"  `medical_insurance_code` varchar(50) NULL COMMENT '医保编码',\r\n" + 
        		"  `origin_name` varchar(100) NULL COMMENT '产地名称',\r\n" + 
        		"  `drug_form_code` varchar(3)  NOT NULL COMMENT '药物剂型代码',\r\n" + 
        		"  `drug_form_name` varchar(200) NULL COMMENT '药物剂型名称',\r\n" + 
        		"  `base_drug_flag` varchar(1)  NOT NULL COMMENT '基药标识',\r\n" + 
        		"  `drug_using_days` int NULL COMMENT '用药天数',\r\n" + 
        		"  `drug_using_freq` varchar(3)  NOT NULL COMMENT '药物使用频次代码',\r\n" + 
        		"  `drug_using_freq_name` varchar(20)  NOT NULL COMMENT '药物使用频次名称',\r\n" + 
        		"  `drug_dose_unit` varchar(50)  NOT NULL COMMENT '药物使用剂量单位',\r\n" + 
        		"  `drug_per_dose` decimal(7,2) NULL COMMENT '药物使用单次剂量',\r\n" + 
        		"  `drug_total_dose` decimal(20,4)  NOT NULL COMMENT '药物使用总剂量',\r\n" + 
        		"  `drug_total_unit` varchar(128) NULL COMMENT '药物使用总剂量单位',\r\n" + 
        		"  `drug_route_code` varchar(3) NULL COMMENT '药物使用途径代码',\r\n" + 
        		"  `drug_route_name` varchar(20) NULL COMMENT '药物使用途径名称',\r\n" + 
        		"  `drug_stop_dtime` datetime NULL COMMENT '用药停止日期时间',\r\n" + 
        		"  `spec` varchar(50)  NOT NULL COMMENT '规格',\r\n" + 
        		"  `group_no` varchar(128) NULL COMMENT '处方药品组号',\r\n" + 
        		"  `drug_start_dtime` datetime NULL COMMENT '处方开具时间',\r\n" + 
        		"  `dispensing_dtime` datetime NULL COMMENT '发药时间',\r\n" + 
        		"  `drug_dose_num` decimal(5) NULL COMMENT '发药数量',\r\n" + 
        		"  `notes` varchar(4000) NULL COMMENT '备注',\r\n" + 
        		"  `ddd_value` decimal(20,4) NULL COMMENT 'DDD值/最小剂量',\r\n" + 
        		"  `ant_flag` varchar(1) NULL COMMENT '抗菌药物标志',\r\n" + 
        		"  `mast_mark` varchar(1) NULL COMMENT '主药标志',\r\n" + 
        		"  `mind_mark` varchar(1) NULL COMMENT '精神药物标志',\r\n" + 
        		"  `ane_mark` varchar(1) NULL COMMENT '麻醉药物标志',\r\n" + 
        		"  `vacc_mark` varchar(1) NULL COMMENT '疫苗标志',\r\n" + 
        		"  `infuse_mark` varchar(1) NULL COMMENT '输液用药标志',\r\n" + 
        		"  `skin_mark` varchar(1) NULL COMMENT '皮试标志',\r\n" + 
        		"  `anti_use_grade_code` varchar(1) NULL COMMENT '抗菌药物使用级别代码',\r\n" + 
        		"  `anti_use_grade_name` varchar(50) NULL COMMENT '抗菌药物使用级别名称',\r\n" + 
        		"  `crucial_drug_name` varchar(2000) NULL COMMENT '关键药物名称',\r\n" + 
        		"  `crucial_drug_usage` varchar(4000) NULL COMMENT '关键药物用法',\r\n" + 
        		"  `prescribe_no` varchar(200) NULL COMMENT '处方编号',\r\n" + 
        		"  `pres_class_code` varchar(1) NULL COMMENT '处方类别代码(1.中药饮片处方2.中成药处方3.西药处方)',\r\n" + 
        		"  `pres_class_name` varchar(10) NULL COMMENT '处方类别',\r\n" + 
        		"  `drug_adverse_reaction` varchar(4000) NULL COMMENT '药物不良反应情况',\r\n" + 
        		"  `contigency_mark` varchar(1) NULL COMMENT '预防性标志',\r\n" + 
        		"  `unit` varchar(20) NULL COMMENT '药品包装规格单位',\r\n" + 
        		"  `drug_unit_num` smallint NULL COMMENT '药品包装规格系数',\r\n" + 
        		"  `state` int NULL COMMENT '状态',\r\n" + 
        		"  `deleted` boolean NULL COMMENT '删除标识',\r\n" + 
        		"  `create_by` bigint NULL COMMENT '创建人',\r\n" + 
        		"  `create_time` datetime NULL COMMENT '创建时间',\r\n" + 
        		"  `update_by` bigint NULL COMMENT '修改人',\r\n" + 
        		"  `update_time` datetime  NOT NULL COMMENT '修改时间',\r\n" + 
        		"  `business_time` datetime  NOT NULL COMMENT '业务时间'\r\n" + 
        		") ENGINE=OLAP \r\n" + 
        		"UNIQUE KEY(`id`) \r\n" + 
        		"COMMENT '门诊用药' \r\n" + 
        		"DISTRIBUTED BY HASH(`id`) BUCKETS 10 \r\n" + 
        		"PROPERTIES ( \r\n" + 
        		"\"replication_allocation\" = \"tag.location.default: 1\", \r\n" + 
        		"\"is_being_synced\" = \"false\", \r\n" + 
        		"\"storage_format\" = \"V2\", \r\n" + 
        		"\"light_schema_change\" = \"true\", \r\n" + 
        		"\"disable_auto_compaction\" = \"false\", \r\n" + 
        		"\"enable_single_replica_compaction\" = \"false\");\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"CREATE TABLE IF NOT EXISTS `ygt_db`.`outpatient_sett` (\r\n" + 
        		"  `id` bigint  NOT NULL COMMENT 'ID',\r\n" + 
        		"  `org_id` bigint NULL COMMENT '机构标识',\r\n" + 
        		"  `org_code` varchar(50)  NOT NULL COMMENT '机构编码',\r\n" + 
        		"  `org_name` varchar(50)  NOT NULL COMMENT '机构名称',\r\n" + 
        		"  `health_card_no` varchar(36) NULL COMMENT '居民健康卡号',\r\n" + 
        		"  `outpat_form_no` varchar(128) NULL COMMENT '门诊记录表编号',\r\n" + 
        		"  `id_type_code` varchar(2)  NOT NULL COMMENT '身份证件类别代码',\r\n" + 
        		"  `id_type_name` varchar(20)  NOT NULL COMMENT '身份证件类别名称',\r\n" + 
        		"  `id_no` varchar(128)  NOT NULL COMMENT '身份证件号码',\r\n" + 
        		"  `outpatient_code` varchar(128) NULL COMMENT '就诊号',\r\n" + 
        		"  `outpatient_mark` bigint NULL COMMENT '就诊标识',\r\n" + 
        		"  `dept_code` varchar(9) NULL COMMENT '收费科室编码',\r\n" + 
        		"  `dept_name` varchar(40) NULL COMMENT '收费科室名称',\r\n" + 
        		"  `settlement_serial` varchar(128) NULL COMMENT '结算号',\r\n" + 
        		"  `invoice_number` varchar(128) NULL COMMENT '发票号',\r\n" + 
        		"  `pay_way_code` varchar(2)  NOT NULL COMMENT '医疗付款方式代码',\r\n" + 
        		"  `pay_way_name` varchar(20) NULL COMMENT '医疗付款方式',\r\n" + 
        		"  `outpat_settle_way_code` varchar(2)  NOT NULL COMMENT '费用结算方式代码',\r\n" + 
        		"  `outpat_settle_way_name` varchar(10) NULL COMMENT '费用结算方式',\r\n" + 
        		"  `sec_type_code` varchar(2)  NOT NULL COMMENT '保险类型代码',\r\n" + 
        		"  `sec_type_name` varchar(20) NULL COMMENT '保险类别',\r\n" + 
        		"  `sec_no` varchar(128) NULL COMMENT '医疗保险号',\r\n" + 
        		"  `outpatient_famt` decimal(12,4)  NOT NULL COMMENT '总费用',\r\n" + 
        		"  `charges` decimal(12,4)  NOT NULL COMMENT '个人现金支付',\r\n" + 
        		"  `reduced_payment` decimal(12,4)  NOT NULL COMMENT '减免现金',\r\n" + 
        		"  `insurance_account_charges` decimal(12,4)  NOT NULL COMMENT '医保个人账户支付',\r\n" + 
        		"  `insurance_fund` decimal(12,4)  NOT NULL COMMENT '医保统筹基金支付',\r\n" + 
        		"  `other_payment` decimal(12,4)  NOT NULL COMMENT '其他支付',\r\n" + 
        		"  `insur_balance` decimal(12,4) NULL COMMENT '医保余额',\r\n" + 
        		"  `contract_unit` varchar(128) NULL COMMENT '结算单位',\r\n" + 
        		"  `settle_date` datetime  NOT NULL COMMENT '结算日期',\r\n" + 
        		"  `operator` varchar(40) NULL COMMENT '结算员',\r\n" + 
        		"  `guid` varchar(36) NULL COMMENT '唯一GUID号',\r\n" + 
        		"  `charge_refund` varchar(1) NULL COMMENT '收费/退费标志',\r\n" + 
        		"  `organ_name` varchar(50)  NOT NULL COMMENT '医疗机构名称',\r\n" + 
        		"  `charge_refund_name` varchar(2) NULL COMMENT '收费/退费标志名称',\r\n" + 
        		"  `rcd_id_no` varchar(18) NULL COMMENT '收费员身份证号',\r\n" + 
        		"  `rcd_name` varchar(40) NULL COMMENT '收费员姓名',\r\n" + 
        		"  `rcd_dtime` datetime NULL COMMENT '收费/退费日期时间',\r\n" + 
        		"  `mobile_pay` varchar(1) NULL COMMENT '移动支付标识',\r\n" + 
        		"  `internet_mark` varchar(1) NULL COMMENT '互联网收费标识',\r\n" + 
        		"  `state` int NULL COMMENT '状态',\r\n" + 
        		"  `deleted` boolean NULL COMMENT '删除标识',\r\n" + 
        		"  `create_by` bigint NULL COMMENT '创建人',\r\n" + 
        		"  `create_time` datetime NULL COMMENT '创建时间',\r\n" + 
        		"  `update_by` bigint NULL COMMENT '修改人',\r\n" + 
        		"  `update_time` datetime  NOT NULL COMMENT '修改时间',\r\n" + 
        		"  `business_time` datetime  NOT NULL COMMENT '业务时间'\r\n" + 
        		") ENGINE=OLAP \r\n" + 
        		"UNIQUE KEY(`id`) \r\n" + 
        		"COMMENT '门诊费用结算' \r\n" + 
        		"DISTRIBUTED BY HASH(`id`) BUCKETS 10 \r\n" + 
        		"PROPERTIES ( \r\n" + 
        		"\"replication_allocation\" = \"tag.location.default: 1\", \r\n" + 
        		"\"is_being_synced\" = \"false\", \r\n" + 
        		"\"storage_format\" = \"V2\", \r\n" + 
        		"\"light_schema_change\" = \"true\", \r\n" + 
        		"\"disable_auto_compaction\" = \"false\", \r\n" + 
        		"\"enable_single_replica_compaction\" = \"false\");\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"CREATE TABLE IF NOT EXISTS `ygt_db`.`outpatient_fee` (\r\n" + 
        		"  `id` bigint  NOT NULL COMMENT 'ID',\r\n" + 
        		"  `org_id` bigint NULL COMMENT '机构标识',\r\n" + 
        		"  `org_code` varchar(50)  NOT NULL COMMENT '机构编码',\r\n" + 
        		"  `org_name` varchar(50)  NOT NULL COMMENT '机构名称',\r\n" + 
        		"  `health_card_no` varchar(36) NULL COMMENT '居民健康卡号',\r\n" + 
        		"  `outpat_form_no` varchar(128) NULL COMMENT '门诊记录表编号',\r\n" + 
        		"  `id_type_code` varchar(2)  NOT NULL COMMENT '身份证件类别代码',\r\n" + 
        		"  `id_type_name` varchar(20)  NOT NULL COMMENT '身份证件类别名称',\r\n" + 
        		"  `id_no` varchar(128)  NOT NULL COMMENT '身份证件号码',\r\n" + 
        		"  `settlement_serial` varchar(128) NULL COMMENT '结算号',\r\n" + 
        		"  `fmzfee_info_id` bigint NULL COMMENT '门诊费用明细标识',\r\n" + 
        		"  `outpat_fee_type_code` varchar(2)  NOT NULL COMMENT '门诊费用分类代码',\r\n" + 
        		"  `outpat_fee_type_name` varchar(20) NULL COMMENT '门诊费用分类名称',\r\n" + 
        		"  `outpat_fee_amount` decimal(12,4) NULL COMMENT '门诊费用金额(元)',\r\n" + 
        		"  `pay_way_code` varchar(2)  NOT NULL COMMENT '医疗付款方式代码',\r\n" + 
        		"  `pay_way_name` varchar(20) NULL COMMENT '医疗付款方式',\r\n" + 
        		"  `outpat_settle_way_code` varchar(2)  NOT NULL COMMENT '费用结算方式代码',\r\n" + 
        		"  `outpat_settle_way_name` varchar(10) NULL COMMENT '费用结算方式',\r\n" + 
        		"  `price_item_local_code` varchar(128)  NOT NULL COMMENT '价项院内代码',\r\n" + 
        		"  `price_item_local_name` varchar(128)  NOT NULL COMMENT '价项院内名称',\r\n" + 
        		"  `price_item_std_code` varchar(20)  NOT NULL COMMENT '价项标准代码',\r\n" + 
        		"  `price_item_std_name` varchar(128)  NOT NULL COMMENT '价项标准名称',\r\n" + 
        		"  `deduct_fees_dtime` datetime  NOT NULL COMMENT '扣费日期',\r\n" + 
        		"  `spec` varchar(50) NULL COMMENT '规格',\r\n" + 
        		"  `unit` varchar(20)  NOT NULL COMMENT '单位',\r\n" + 
        		"  `price` decimal(20,4)  NOT NULL COMMENT '单价',\r\n" + 
        		"  `quantity` decimal(12,2)  NOT NULL COMMENT '数量',\r\n" + 
        		"  `notes` varchar(4000) NULL COMMENT '备注',\r\n" + 
        		"  `self_payment` decimal(12,4) NULL COMMENT '自费金额(个人承担)',\r\n" + 
        		"  `charges` decimal(12,4) NULL COMMENT '自付',\r\n" + 
        		"  `self_percent` decimal(12,4) NULL COMMENT '自理比例',\r\n" + 
        		"  `pbv_mark` varchar(1) NULL COMMENT '诊间支付标志',\r\n" + 
        		"  `apply_dept_code` varchar(9)  NOT NULL COMMENT '开单科室代码',\r\n" + 
        		"  `apply_dept_name` varchar(40)  NOT NULL COMMENT '开单科室名称',\r\n" + 
        		"  `apply_doctor_code` varchar(30)  NOT NULL COMMENT '开单医生ID',\r\n" + 
        		"  `apply_doctor_name` varchar(40)  NOT NULL COMMENT '开单医生姓名',\r\n" + 
        		"  `exec_dept_code` varchar(9) NULL COMMENT '执行科室代码',\r\n" + 
        		"  `exec_dept_name` varchar(40) NULL COMMENT '执行科室名称',\r\n" + 
        		"  `exec_man_code` varchar(30) NULL COMMENT '执行医生代码',\r\n" + 
        		"  `exec_man` varchar(40) NULL COMMENT '执行医生',\r\n" + 
        		"  `insurance_charges` decimal(12,4) NULL COMMENT '医保金额',\r\n" + 
        		"  `derate_charges` decimal(12,4) NULL COMMENT '减免金额',\r\n" + 
        		"  `operator` varchar(40)  NOT NULL COMMENT '操作员',\r\n" + 
        		"  `babay_flag` varchar(1) NULL COMMENT '婴儿标志',\r\n" + 
        		"  `proj_deno` varchar(36) NULL COMMENT '收费项目编号(医保)',\r\n" + 
        		"  `hos_proj_deno` varchar(36)  NOT NULL COMMENT '收费项目编号(医院)',\r\n" + 
        		"  `hos_proj_name` varchar(80)  NOT NULL COMMENT '收费项目名称(医院)',\r\n" + 
        		"  `fin_cat_code` varchar(4) NULL COMMENT '收费项目财务分类代码',\r\n" + 
        		"  `fin_cat_name` varchar(10) NULL COMMENT '收费项目财务分类名称',\r\n" + 
        		"  `if_medi_insu` varchar(1) NULL COMMENT '是否属于医保项目',\r\n" + 
        		"  `rcd_id_no` varchar(18) NULL COMMENT '收费员身份证号',\r\n" + 
        		"  `rcd_name` varchar(40)  NOT NULL COMMENT '收费员姓名',\r\n" + 
        		"  `rcd_dtime` datetime  NOT NULL COMMENT '收费/退费日期时间',\r\n" + 
        		"  `refund_mark` varchar(1) NULL COMMENT '退费标志',\r\n" + 
        		"  `high_consum_mark` varchar(1) NULL COMMENT '高值耗材标志',\r\n" + 
        		"  `drug_mark` varchar(1) NULL COMMENT '药品标志',\r\n" + 
        		"  `ant_flag` varchar(1) NULL COMMENT '抗菌药标志',\r\n" + 
        		"  `mind_mark` varchar(1) NULL COMMENT '精神药物标志',\r\n" + 
        		"  `ane_mark` varchar(1) NULL COMMENT '麻醉药物标志',\r\n" + 
        		"  `basic_mark` varchar(1) NULL COMMENT '基本药物标志',\r\n" + 
        		"  `vacc_mark` varchar(1) NULL COMMENT '疫苗标志',\r\n" + 
        		"  `disposable_mark` varchar(1) NULL COMMENT '一次性材料标志',\r\n" + 
        		"  `app_id` varchar(36) NULL COMMENT '检查\\检验申请ID',\r\n" + 
        		"  `state` int NULL COMMENT '状态',\r\n" + 
        		"  `deleted` boolean NULL COMMENT '删除标识',\r\n" + 
        		"  `create_by` bigint NULL COMMENT '创建人',\r\n" + 
        		"  `create_time` datetime NULL COMMENT '创建时间',\r\n" + 
        		"  `update_by` bigint NULL COMMENT '修改人',\r\n" + 
        		"  `update_time` datetime  NOT NULL COMMENT '修改时间',\r\n" + 
        		"  `business_time` datetime  NOT NULL COMMENT '业务时间'\r\n" + 
        		") ENGINE=OLAP \r\n" + 
        		"UNIQUE KEY(`id`) \r\n" + 
        		"COMMENT '门诊费用明细' \r\n" + 
        		"DISTRIBUTED BY HASH(`id`) BUCKETS 10 \r\n" + 
        		"PROPERTIES ( \r\n" + 
        		"\"replication_allocation\" = \"tag.location.default: 1\", \r\n" + 
        		"\"is_being_synced\" = \"false\", \r\n" + 
        		"\"storage_format\" = \"V2\", \r\n" + 
        		"\"light_schema_change\" = \"true\", \r\n" + 
        		"\"disable_auto_compaction\" = \"false\", \r\n" + 
        		"\"enable_single_replica_compaction\" = \"false\");\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"CREATE TABLE IF NOT EXISTS `ygt_db`.`eds_disp_pres_master` (\r\n" + 
        		"  `id` bigint  NOT NULL COMMENT 'ID',\r\n" + 
        		"  `org_id` bigint NULL COMMENT '机构标识',\r\n" + 
        		"  `org_code` varchar(50)  NOT NULL COMMENT '机构编码',\r\n" + 
        		"  `org_name` varchar(50)  NOT NULL COMMENT '机构名称',\r\n" + 
        		"  `patient_id` varchar(128) NULL COMMENT '患者ID',\r\n" + 
        		"  `name` varchar(40) NULL COMMENT '患者姓名',\r\n" + 
        		"  `health_card_no` varchar(36) NULL COMMENT '居民健康卡号',\r\n" + 
        		"  `outpat_form_no` varchar(128) NULL COMMENT '门诊记录表编号',\r\n" + 
        		"  `id_type_code` varchar(2)  NOT NULL COMMENT '身份证件类别代码',\r\n" + 
        		"  `id_type_name` varchar(20)  NOT NULL COMMENT '身份证件类别名称',\r\n" + 
        		"  `id_no` varchar(128)  NOT NULL COMMENT '身份证件号码',\r\n" + 
        		"  `prescribe_no` varchar(200) NULL COMMENT '处方编号',\r\n" + 
        		"  `internet_mark` varchar(1) NULL COMMENT '互联网开方标识',\r\n" + 
        		"  `pres_class_code` varchar(2) NULL COMMENT '处方类别代码',\r\n" + 
        		"  `pres_class_name` varchar(10) NULL COMMENT '处方类别',\r\n" + 
        		"  `sex_code` varchar(1)  NOT NULL COMMENT '性别代码',\r\n" + 
        		"  `gender` varchar(10) NULL COMMENT '性别',\r\n" + 
        		"  `age_year` smallint NULL COMMENT '年龄(岁)',\r\n" + 
        		"  `age_month` varchar(8) NULL COMMENT '年龄(月)',\r\n" + 
        		"  `age` smallint NULL COMMENT '年龄',\r\n" + 
        		"  `age_unit_code` varchar(1) NULL COMMENT '年龄单位代码',\r\n" + 
        		"  `age_unit_name` varchar(20) NULL COMMENT '年龄单位名称',\r\n" + 
        		"  `fadvice_id` bigint NULL COMMENT '门诊医嘱标识',\r\n" + 
        		"  `diagnosis_code` varchar(24) NULL COMMENT '西医诊断编码',\r\n" + 
        		"  `diagnosis_name` varchar(120) NULL COMMENT '西医诊断名称',\r\n" + 
        		"  `tcm_diagnosis_code` varchar(20) NULL COMMENT '中医病名代码',\r\n" + 
        		"  `tcm_diagnosis_name` varchar(128) NULL COMMENT '中医病名名称',\r\n" + 
        		"  `tcm_syndrome_code` varchar(20) NULL COMMENT '中医证候代码',\r\n" + 
        		"  `tcm_syndrome_name` varchar(128) NULL COMMENT '中医证候名称',\r\n" + 
        		"  `therapeutic_principles` varchar(2000) NULL COMMENT '治则治法',\r\n" + 
        		"  `pres_describe` varchar(4000) NULL COMMENT '处方说明',\r\n" + 
        		"  `tcm_decoc_piece_method` varchar(2000) NULL COMMENT '中药煎煮方法',\r\n" + 
        		"  `tcm_use_method` varchar(2000) NULL COMMENT '中药用药方法',\r\n" + 
        		"  `term_count` decimal(5) NULL COMMENT '处方有效天数',\r\n" + 
        		"  `apply_dept_code` varchar(9) NULL COMMENT '处方开立科室代码',\r\n" + 
        		"  `apply_dept_name` varchar(40) NULL COMMENT '处方开立科室名称',\r\n" + 
        		"  `apply_time` datetime NULL COMMENT '处方开立日期',\r\n" + 
        		"  `apply_operator_code` varchar(30) NULL COMMENT '处方开立医师代码',\r\n" + 
        		"  `apply_operator` varchar(40) NULL COMMENT '处方开立医师签名',\r\n" + 
        		"  `perform_operator` varchar(40) NULL COMMENT '执行人',\r\n" + 
        		"  `perform_operator_code` varchar(30) NULL COMMENT '执行人代码',\r\n" + 
        		"  `perform_dept_code` varchar(9) NULL COMMENT '执行科室代码',\r\n" + 
        		"  `perform_dept_name` varchar(40) NULL COMMENT '执行科室名称',\r\n" + 
        		"  `perform_dtime` datetime NULL COMMENT '执行时间',\r\n" + 
        		"  `audit_operator_code` varchar(30) NULL COMMENT '处方审核医师代码',\r\n" + 
        		"  `audit_operator` varchar(40) NULL COMMENT '处方审核医师',\r\n" + 
        		"  `audit_time` datetime NULL COMMENT '审核日期',\r\n" + 
        		"  `distribute_operator_code` varchar(30) NULL COMMENT '处方调配药剂师代码',\r\n" + 
        		"  `distribute_operator` varchar(40) NULL COMMENT '处方调配医师',\r\n" + 
        		"  `check_operator_code` varchar(30) NULL COMMENT '处方核对药剂师代码',\r\n" + 
        		"  `check_operator` varchar(40) NULL COMMENT '处方核对医师',\r\n" + 
        		"  `dispense_operator_code` varchar(30) NULL COMMENT '处方发药药剂师代码',\r\n" + 
        		"  `dispense_operator` varchar(40) NULL COMMENT '处方发药医师',\r\n" + 
        		"  `notes` varchar(1000) NULL COMMENT '处方备注信息',\r\n" + 
        		"  `cost` decimal(12,4) NULL COMMENT '处方药品金额',\r\n" + 
        		"  `state` int NULL COMMENT '状态',\r\n" + 
        		"  `deleted` boolean NULL COMMENT '删除标识',\r\n" + 
        		"  `create_by` bigint NULL COMMENT '创建人',\r\n" + 
        		"  `create_time` datetime NULL COMMENT '创建时间',\r\n" + 
        		"  `update_by` bigint NULL COMMENT '修改人',\r\n" + 
        		"  `update_time` datetime  NOT NULL COMMENT '修改时间',\r\n" + 
        		"  `business_time` datetime  NOT NULL COMMENT '业务时间'\r\n" + 
        		") ENGINE=OLAP \r\n" + 
        		"UNIQUE KEY(`id`) \r\n" + 
        		"COMMENT '门急诊处方信息' \r\n" + 
        		"DISTRIBUTED BY HASH(`id`) BUCKETS 10 \r\n" + 
        		"PROPERTIES ( \r\n" + 
        		"\"replication_allocation\" = \"tag.location.default: 1\", \r\n" + 
        		"\"is_being_synced\" = \"false\", \r\n" + 
        		"\"storage_format\" = \"V2\", \r\n" + 
        		"\"light_schema_change\" = \"true\", \r\n" + 
        		"\"disable_auto_compaction\" = \"false\", \r\n" + 
        		"\"enable_single_replica_compaction\" = \"false\");\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"CREATE TABLE IF NOT EXISTS `ygt_db`.`report_outdaily` (\r\n" + 
        		"  `id` bigint  NOT NULL COMMENT 'ID',\r\n" + 
        		"  `org_id` bigint NULL COMMENT '机构标识',\r\n" + 
        		"  `org_code` varchar(50)  NOT NULL COMMENT '机构编码',\r\n" + 
        		"  `org_name` varchar(50)  NOT NULL COMMENT '机构名称',\r\n" + 
        		"  `statistical_date` datetime NULL COMMENT '统计业务日期',\r\n" + 
        		"  `dept_code` varchar(30)  NOT NULL COMMENT '科室代码',\r\n" + 
        		"  `dept_name` varchar(40)  NOT NULL COMMENT '科室名称',\r\n" + 
        		"  `reg_type_code` varchar(1)  NOT NULL COMMENT '挂号类别代码',\r\n" + 
        		"  `reg_type` varchar(10)  NOT NULL COMMENT '挂号类别',\r\n" + 
        		"  `reg_amount` int  NOT NULL COMMENT '挂号数量',\r\n" + 
        		"  `std_dept_code` varchar(9)  NOT NULL COMMENT '标准科室编码',\r\n" + 
        		"  `state` int NULL COMMENT '状态',\r\n" + 
        		"  `deleted` boolean NULL COMMENT '删除标识',\r\n" + 
        		"  `create_by` bigint NULL COMMENT '创建人',\r\n" + 
        		"  `create_time` datetime NULL COMMENT '创建时间',\r\n" + 
        		"  `update_by` bigint NULL COMMENT '修改人',\r\n" + 
        		"  `update_time` datetime  NOT NULL COMMENT '修改时间',\r\n" + 
        		"  `business_time` datetime  NOT NULL COMMENT '业务时间'\r\n" + 
        		") ENGINE=OLAP \r\n" + 
        		"UNIQUE KEY(`id`) \r\n" + 
        		"COMMENT '门诊诊疗日报' \r\n" + 
        		"DISTRIBUTED BY HASH(`id`) BUCKETS 10 \r\n" + 
        		"PROPERTIES ( \r\n" + 
        		"\"replication_allocation\" = \"tag.location.default: 1\", \r\n" + 
        		"\"is_being_synced\" = \"false\", \r\n" + 
        		"\"storage_format\" = \"V2\", \r\n" + 
        		"\"light_schema_change\" = \"true\", \r\n" + 
        		"\"disable_auto_compaction\" = \"false\", \r\n" + 
        		"\"enable_single_replica_compaction\" = \"false\");\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"CREATE TABLE IF NOT EXISTS `ygt_db`.`report_outfee` (\r\n" + 
        		"  `id` bigint  NOT NULL COMMENT 'ID',\r\n" + 
        		"  `org_id` bigint NULL COMMENT '机构标识',\r\n" + 
        		"  `org_code` varchar(50)  NOT NULL COMMENT '机构编码',\r\n" + 
        		"  `org_name` varchar(50)  NOT NULL COMMENT '机构名称',\r\n" + 
        		"  `statistical_date` datetime NULL COMMENT '统计业务日期',\r\n" + 
        		"  `dept_code` varchar(30)  NOT NULL COMMENT '科室代码',\r\n" + 
        		"  `dept_name` varchar(40)  NOT NULL COMMENT '科室名称',\r\n" + 
        		"  `fee_reg` decimal(12,4) NULL COMMENT '挂号费',\r\n" + 
        		"  `fee_diagnosis` decimal(12,4) NULL COMMENT '诊疗费',\r\n" + 
        		"  `fee_exam` decimal(12,4) NULL COMMENT '检查费',\r\n" + 
        		"  `fee_mri` decimal(12,4) NULL COMMENT 'MRI费',\r\n" + 
        		"  `fee_ct` decimal(12,4) NULL COMMENT 'CT费',\r\n" + 
        		"  `fee_color_bscan` decimal(12,4) NULL COMMENT '彩超费',\r\n" + 
        		"  `fee_treatment` decimal(12,4) NULL COMMENT '治疗费',\r\n" + 
        		"  `fee_lab_test` decimal(12,4) NULL COMMENT '化验费',\r\n" + 
        		"  `fee_oxygen` decimal(12,4) NULL COMMENT '输氧费',\r\n" + 
        		"  `fee_blood` decimal(12,4) NULL COMMENT '输血费',\r\n" + 
        		"  `fee_operation` decimal(12,4) NULL COMMENT '手术费',\r\n" + 
        		"  `fee_western_medicine` decimal(12,4) NULL COMMENT '西药费',\r\n" + 
        		"  `fee_cn_medicine` decimal(12,4) NULL COMMENT '中成药费',\r\n" + 
        		"  `fee_cn_herbal_medicine` decimal(12,4) NULL COMMENT '中草药费',\r\n" + 
        		"  `fee_anaes` decimal(12,4) NULL COMMENT '麻醉费',\r\n" + 
        		"  `fee_anaes_others` decimal(12,4) NULL COMMENT '麻醉相关费',\r\n" + 
        		"  `fee_ambulance` decimal(12,4) NULL COMMENT '救护车费',\r\n" + 
        		"  `fee_materials` decimal(12,4) NULL COMMENT '材料费',\r\n" + 
        		"  `fee_other` decimal(12,4) NULL COMMENT '其他医疗费',\r\n" + 
        		"  `fee_total` decimal(12,4) NULL COMMENT '合计',\r\n" + 
        		"  `std_dept_code` varchar(9)  NOT NULL COMMENT '标准科室编码',\r\n" + 
        		"  `state` int NULL COMMENT '状态',\r\n" + 
        		"  `deleted` boolean NULL COMMENT '删除标识',\r\n" + 
        		"  `create_by` bigint NULL COMMENT '创建人',\r\n" + 
        		"  `create_time` datetime NULL COMMENT '创建时间',\r\n" + 
        		"  `update_by` bigint NULL COMMENT '修改人',\r\n" + 
        		"  `update_time` datetime  NOT NULL COMMENT '修改时间',\r\n" + 
        		"  `business_time` datetime  NOT NULL COMMENT '业务时间'\r\n" + 
        		") ENGINE=OLAP \r\n" + 
        		"UNIQUE KEY(`id`) \r\n" + 
        		"COMMENT '门诊费用日报' \r\n" + 
        		"DISTRIBUTED BY HASH(`id`) BUCKETS 10 \r\n" + 
        		"PROPERTIES ( \r\n" + 
        		"\"replication_allocation\" = \"tag.location.default: 1\", \r\n" + 
        		"\"is_being_synced\" = \"false\", \r\n" + 
        		"\"storage_format\" = \"V2\", \r\n" + 
        		"\"light_schema_change\" = \"true\", \r\n" + 
        		"\"disable_auto_compaction\" = \"false\", \r\n" + 
        		"\"enable_single_replica_compaction\" = \"false\");\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"CREATE TABLE IF NOT EXISTS `ygt_db`.`eds_transfusion_record` (\r\n" + 
        		"  `id` bigint  NOT NULL COMMENT 'ID',\r\n" + 
        		"  `org_id` bigint NULL COMMENT '机构标识',\r\n" + 
        		"  `org_code` varchar(50)  NOT NULL COMMENT '机构编码',\r\n" + 
        		"  `org_name` varchar(50)  NOT NULL COMMENT '机构名称',\r\n" + 
        		"  `patient_id` varchar(128)  NOT NULL COMMENT '患者ID',\r\n" + 
        		"  `event_type` smallint  NOT NULL COMMENT '事件类型',\r\n" + 
        		"  `event_no` varchar(128)  NOT NULL COMMENT '事件号',\r\n" + 
        		"  `e_order_no` varchar(200)  NOT NULL COMMENT '电子申请单号',\r\n" + 
        		"  `dept_code` varchar(30)  NOT NULL COMMENT '科室编码',\r\n" + 
        		"  `dept_name` varchar(128)  NOT NULL COMMENT '科室名称',\r\n" + 
        		"  `ward_name` varchar(200) NULL COMMENT '病区名称',\r\n" + 
        		"  `dept_room` varchar(50) NULL COMMENT '病房号',\r\n" + 
        		"  `bed_no` varchar(50)  NOT NULL COMMENT '病床号',\r\n" + 
        		"  `name` varchar(40)  NOT NULL COMMENT '患者姓名',\r\n" + 
        		"  `sex_code` varchar(1)  NOT NULL COMMENT '性别代码',\r\n" + 
        		"  `gender` varchar(10)  NOT NULL COMMENT '性别',\r\n" + 
        		"  `age_year` smallint  NOT NULL COMMENT '年龄(岁)',\r\n" + 
        		"  `age_month` varchar(8)  NOT NULL COMMENT '年龄(月)',\r\n" + 
        		"  `age` smallint NULL COMMENT '年龄',\r\n" + 
        		"  `age_unit_code` varchar(1) NULL COMMENT '年龄单位代码',\r\n" + 
        		"  `age_unit_name` varchar(20) NULL COMMENT '年龄单位名称',\r\n" + 
        		"  `abo_code` varchar(1)  NOT NULL COMMENT 'ABO血型代码',\r\n" + 
        		"  `abo_name` varchar(10)  NOT NULL COMMENT 'ABO血型名称',\r\n" + 
        		"  `rh_code` varchar(1)  NOT NULL COMMENT 'Rh血型代码',\r\n" + 
        		"  `rh_name` varchar(10)  NOT NULL COMMENT 'Rh血型名称',\r\n" + 
        		"  `transfuse_history_flag` varchar(1) NULL COMMENT '输血史标识代码',\r\n" + 
        		"  `transfuse_history_flag_name` varchar(10) NULL COMMENT '输血史标识名称',\r\n" + 
        		"  `disease_diagnosis` varchar(20) NULL COMMENT '疾病诊断代码',\r\n" + 
        		"  `disease_diagnosis_name` varchar(200) NULL COMMENT '疾病诊断名称',\r\n" + 
        		"  `trans_kind` varchar(1)  NOT NULL COMMENT '输血性质代码',\r\n" + 
        		"  `trans_kind_name` varchar(128)  NOT NULL COMMENT '输血性质名称',\r\n" + 
        		"  `apply_abo_blood_code` varchar(1)  NOT NULL COMMENT '申请ABO血型代码',\r\n" + 
        		"  `apply_abo_blood_name` varchar(10)  NOT NULL COMMENT '申请ABO血型名称',\r\n" + 
        		"  `apply_rh_blood_code` varchar(1)  NOT NULL COMMENT '申请Rh血型代码',\r\n" + 
        		"  `apply_rh_blood_name` varchar(10)  NOT NULL COMMENT '申请Rh血型名称',\r\n" + 
        		"  `transfusion_indication` varchar(2000) NULL COMMENT '输血指征',\r\n" + 
        		"  `transfusion_process_rec` varchar(4000) NULL COMMENT '输血过程记录',\r\n" + 
        		"  `transfusion_code` varchar(200)  NOT NULL COMMENT '输血品种代码',\r\n" + 
        		"  `transfusion_name` varchar(200)  NOT NULL COMMENT '输血品种名称',\r\n" + 
        		"  `bags_coding` varchar(10) NULL COMMENT '血袋编码',\r\n" + 
        		"  `blood` decimal(12,2)  NOT NULL COMMENT '输血量(ml)',\r\n" + 
        		"  `transfusion_unit` varchar(200)  NOT NULL COMMENT '输血记录单位',\r\n" + 
        		"  `transfuse_reaction_flag` varchar(1) NULL COMMENT '输血反应标志',\r\n" + 
        		"  `transfuse_reaction_type` varchar(200) NULL COMMENT '输血反应类型',\r\n" + 
        		"  `transfusion_count` bigint NULL COMMENT '输血次数',\r\n" + 
        		"  `blood_transf_dtime` datetime NULL COMMENT '输血日期时间',\r\n" + 
        		"  `blood_transf_cause` varchar(100) NULL COMMENT '输血原因',\r\n" + 
        		"  `doctor_signature` varchar(2000) NULL COMMENT '医师签名',\r\n" + 
        		"  `signature_time` datetime NULL COMMENT '签名日期时间',\r\n" + 
        		"  `notes` varchar(4000) NULL COMMENT '备注',\r\n" + 
        		"  `state` int NULL COMMENT '状态',\r\n" + 
        		"  `deleted` boolean NULL COMMENT '删除标识',\r\n" + 
        		"  `create_by` bigint NULL COMMENT '创建人',\r\n" + 
        		"  `create_time` datetime NULL COMMENT '创建时间',\r\n" + 
        		"  `update_by` bigint NULL COMMENT '修改人',\r\n" + 
        		"  `update_time` datetime  NOT NULL COMMENT '修改时间',\r\n" + 
        		"  `business_time` datetime  NOT NULL COMMENT '业务时间'\r\n" + 
        		") ENGINE=OLAP \r\n" + 
        		"UNIQUE KEY(`id`) \r\n" + 
        		"COMMENT '输血记录' \r\n" + 
        		"DISTRIBUTED BY HASH(`id`) BUCKETS 10 \r\n" + 
        		"PROPERTIES ( \r\n" + 
        		"\"replication_allocation\" = \"tag.location.default: 1\", \r\n" + 
        		"\"is_being_synced\" = \"false\", \r\n" + 
        		"\"storage_format\" = \"V2\", \r\n" + 
        		"\"light_schema_change\" = \"true\", \r\n" + 
        		"\"disable_auto_compaction\" = \"false\", \r\n" + 
        		"\"enable_single_replica_compaction\" = \"false\");\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"CREATE TABLE IF NOT EXISTS `ygt_db`.`inpatient` (\r\n" + 
        		"  `id` bigint  NOT NULL COMMENT 'ID',\r\n" + 
        		"  `org_id` bigint NULL COMMENT '机构标识',\r\n" + 
        		"  `org_code` varchar(50)  NOT NULL COMMENT '机构编码',\r\n" + 
        		"  `org_name` varchar(50)  NOT NULL COMMENT '机构名称',\r\n" + 
        		"  `card_no` varchar(36) NULL COMMENT '居民健康卡号',\r\n" + 
        		"  `id_type_code` varchar(2) NULL COMMENT '身份证件类别代码',\r\n" + 
        		"  `id_type_name` varchar(20) NULL COMMENT '身份证件类别名称',\r\n" + 
        		"  `id_no` varchar(128) NULL COMMENT '身份证件号码',\r\n" + 
        		"  `name` varchar(40) NULL COMMENT '患者姓名',\r\n" + 
        		"  `age_year` int NULL COMMENT '年龄（岁）',\r\n" + 
        		"  `patient_id` varchar(128)  NOT NULL COMMENT '病人ID',\r\n" + 
        		"  `inpat_form_no` varchar(128)  NOT NULL COMMENT '住院记录表编号',\r\n" + 
        		"  `case_no` varchar(128)  NOT NULL COMMENT '病案号',\r\n" + 
        		"  `in_hospital_times` varchar(10)  NOT NULL COMMENT '住院次数',\r\n" + 
        		"  `in_dept_code` varchar(30)  NOT NULL COMMENT '入院科室代码',\r\n" + 
        		"  `in_dept_name` varchar(40)  NOT NULL COMMENT '入院科室名称',\r\n" + 
        		"  `std_in_dept_code` varchar(9) NULL COMMENT '标准入院科室编码',\r\n" + 
        		"  `in_dtime` datetime  NOT NULL COMMENT '入院日期时间',\r\n" + 
        		"  `in_reason_code` varchar(1) NULL COMMENT '住院原因代码',\r\n" + 
        		"  `inpat_infectivity_mark` varchar(1) NULL COMMENT '住院者传染性标志',\r\n" + 
        		"  `inpat_ill_state_code` varchar(1)  NOT NULL COMMENT '住院者疾病状态代码',\r\n" + 
        		"  `inpat_ill_state` varchar(20)  NOT NULL COMMENT '住院者疾病状态名称',\r\n" + 
        		"  `other_medical_treatment` varchar(200) NULL COMMENT '其他医学处置',\r\n" + 
        		"  `referral_mark` varchar(1) NULL COMMENT '转诊标志',\r\n" + 
        		"  `discharge_date` datetime NULL COMMENT '出院日期',\r\n" + 
        		"  `discharge_settle_date` datetime NULL COMMENT '出院费用结算日期',\r\n" + 
        		"  `death_reason_code` varchar(24) NULL COMMENT '根本死因代码',\r\n" + 
        		"  `death_reason` varchar(50) NULL COMMENT '根本死因名称',\r\n" + 
        		"  `death_dtime` datetime NULL COMMENT '死亡日期时间',\r\n" + 
        		"  `sec_type_code` varchar(2) NULL COMMENT '保险类型代码',\r\n" + 
        		"  `sec_type_name` varchar(20) NULL COMMENT '保险类型名称',\r\n" + 
        		"  `sec_no` varchar(128) NULL COMMENT '医疗保险号',\r\n" + 
        		"  `is_local_mark` varchar(1) NULL COMMENT '本地标志',\r\n" + 
        		"  `in_bed` varchar(10)  NOT NULL COMMENT '入院床号',\r\n" + 
        		"  `out_dept_name` varchar(50)  NOT NULL COMMENT '出院科室名称',\r\n" + 
        		"  `out_dept_code` varchar(30)  NOT NULL COMMENT '出院科室代码',\r\n" + 
        		"  `std_out_dept_code` varchar(9) NULL COMMENT '标准出院科室编码',\r\n" + 
        		"  `out_bed` varchar(18)  NOT NULL COMMENT '出院床号',\r\n" + 
        		"  `death_mark` varchar(1) NULL COMMENT '死亡标志',\r\n" + 
        		"  `in_inpatient_ward` varchar(50) NULL COMMENT '入院病区',\r\n" + 
        		"  `out_inpatient_ward` varchar(50) NULL COMMENT '出院病区',\r\n" + 
        		"  `stay_days` int NULL COMMENT '住院天数',\r\n" + 
        		"  `use_med_mark` varchar(1) NULL COMMENT '用药标识',\r\n" + 
        		"  `fdiagnosis_id` varchar(50) NULL COMMENT '主诊断标识',\r\n" + 
        		"  `rehosp_after31_purpose` varchar(1) NULL COMMENT '是否出院患者30天内再次',\r\n" + 
        		"  `in_charge_doctor_code` varchar(30) NULL COMMENT '主治医师：编号',\r\n" + 
        		"  `in_charge_doctor_name` varchar(40) NULL COMMENT '主治医师：姓名',\r\n" + 
        		"  `state` int NULL COMMENT '状态',\r\n" + 
        		"  `deleted` boolean NULL COMMENT '删除标识',\r\n" + 
        		"  `create_by` bigint NULL COMMENT '创建人',\r\n" + 
        		"  `create_time` datetime NULL COMMENT '创建时间',\r\n" + 
        		"  `update_by` bigint NULL COMMENT '修改人',\r\n" + 
        		"  `update_time` datetime  NOT NULL COMMENT '修改时间',\r\n" + 
        		"  `business_time` datetime  NOT NULL COMMENT '业务时间'\r\n" + 
        		") ENGINE=OLAP \r\n" + 
        		"UNIQUE KEY(`id`) \r\n" + 
        		"COMMENT '住院摘要信息' \r\n" + 
        		"DISTRIBUTED BY HASH(`id`) BUCKETS 10 \r\n" + 
        		"PROPERTIES ( \r\n" + 
        		"\"replication_allocation\" = \"tag.location.default: 1\", \r\n" + 
        		"\"is_being_synced\" = \"false\", \r\n" + 
        		"\"storage_format\" = \"V2\", \r\n" + 
        		"\"light_schema_change\" = \"true\", \r\n" + 
        		"\"disable_auto_compaction\" = \"false\", \r\n" + 
        		"\"enable_single_replica_compaction\" = \"false\");\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"CREATE TABLE IF NOT EXISTS `ygt_db`.`inpatient_drug` (\r\n" + 
        		"  `id` bigint  NOT NULL COMMENT 'ID',\r\n" + 
        		"  `org_id` bigint NULL COMMENT '机构标识',\r\n" + 
        		"  `org_code` varchar(50)  NOT NULL COMMENT '机构编码',\r\n" + 
        		"  `org_name` varchar(50)  NOT NULL COMMENT '机构名称',\r\n" + 
        		"  `card_no` varchar(36) NULL COMMENT '居民健康卡号',\r\n" + 
        		"  `id_type_code` varchar(2) NULL COMMENT '身份证件类别代码',\r\n" + 
        		"  `id_type_name` varchar(20) NULL COMMENT '身份证件类别名称',\r\n" + 
        		"  `id_no` varchar(128) NULL COMMENT '身份证件号码',\r\n" + 
        		"  `inpat_form_no` varchar(128)  NOT NULL COMMENT '住院记录表编号',\r\n" + 
        		"  `biz_id` varchar(128)  NOT NULL COMMENT '序列号',\r\n" + 
        		"  `drug_category` varchar(64) NULL COMMENT '药物种类',\r\n" + 
        		"  `drug_category_code` varchar(64) NULL COMMENT '药物种类代码',\r\n" + 
        		"  `cn_medicine_type_code` varchar(1) NULL COMMENT '中药类别代码',\r\n" + 
        		"  `cn_medicine_type_name` varchar(10) NULL COMMENT '中药类别名称',\r\n" + 
        		"  `drug_type_code` varchar(7)  NOT NULL COMMENT '药物类型代码',\r\n" + 
        		"  `drug_type_name` varchar(30)  NOT NULL COMMENT '药物类型名称',\r\n" + 
        		"  `drug_local_code` varchar(50)  NOT NULL COMMENT '药物院内编码',\r\n" + 
        		"  `drug_name` varchar(200)  NOT NULL COMMENT '药物名称',\r\n" + 
        		"  `drug_form_code` varchar(6)  NOT NULL COMMENT '药物剂型代码',\r\n" + 
        		"  `drug_form_name` varchar(20)  NOT NULL COMMENT '药物剂型名称',\r\n" + 
        		"  `base_drug_flag` varchar(1) NULL COMMENT '基药标识',\r\n" + 
        		"  `drug_using_days` int NULL COMMENT '用药天数',\r\n" + 
        		"  `drug_using_freq` varchar(3)  NOT NULL COMMENT '药物使用频率',\r\n" + 
        		"  `drug_using_freq_name` varchar(20)  NOT NULL COMMENT '药物使用频率名称',\r\n" + 
        		"  `drug_dose_unit` varchar(50)  NOT NULL COMMENT '药物使用剂量单位',\r\n" + 
        		"  `drug_per_dose` decimal(7,2)  NOT NULL COMMENT '药物使用次剂量',\r\n" + 
        		"  `drug_total_dose` decimal(20,4) NULL COMMENT '药物使用总剂量',\r\n" + 
        		"  `drug_route_code` varchar(3)  NOT NULL COMMENT '药物使用途径代码',\r\n" + 
        		"  `drug_route_name` varchar(20)  NOT NULL COMMENT '药物使用途径名称',\r\n" + 
        		"  `drug_stop_dtime` datetime  NOT NULL COMMENT '用药停止日期时间',\r\n" + 
        		"  `drug_std_name` varchar(200)  NOT NULL COMMENT '药物标准名称',\r\n" + 
        		"  `drug_std_code` varchar(50)  NOT NULL COMMENT '药物标准编码',\r\n" + 
        		"  `drug_basic_code` varchar(12) NULL COMMENT '药物本位码',\r\n" + 
        		"  `drug_total_unit` varchar(128) NULL COMMENT '药物使用-总剂量单位',\r\n" + 
        		"  `spec` varchar(50) NULL COMMENT '规格',\r\n" + 
        		"  `group_no` varchar(128)  NOT NULL COMMENT '成组号(0-无分组)',\r\n" + 
        		"  `drug_start_dtime` datetime  NOT NULL COMMENT '开始时间',\r\n" + 
        		"  `dispensing_dtime` datetime  NOT NULL COMMENT '发药时间',\r\n" + 
        		"  `notes` varchar(4000) NULL COMMENT '备注',\r\n" + 
        		"  `ddd_value` decimal(20,4) NULL COMMENT 'DDD值/最小剂量',\r\n" + 
        		"  `antibacterial_flag` varchar(1) NULL COMMENT '抗菌药物标志',\r\n" + 
        		"  `crucial_drug_name` varchar(2000) NULL COMMENT '关键药物名称',\r\n" + 
        		"  `crucial_drug_usage` varchar(4000) NULL COMMENT '关键药物用法',\r\n" + 
        		"  `drug_adverse_reaction` varchar(4000) NULL COMMENT '药物不良反应情况',\r\n" + 
        		"  `contigency_mark` varchar(1) NULL COMMENT '预防性标志',\r\n" + 
        		"  `specimen_inspect_mark` varchar(1) NULL COMMENT '样本送检标志',\r\n" + 
        		"  `prescription` varchar(64) NULL COMMENT '医嘱编号',\r\n" + 
        		"  `prescription_type` varchar(64) NULL COMMENT '医嘱类型',\r\n" + 
        		"  `prescription_type_code` varchar(64) NULL COMMENT '医嘱类型代码',\r\n" + 
        		"  `order_form_no` varchar(128)  NOT NULL COMMENT '医嘱单号',\r\n" + 
        		"  `state` int NULL COMMENT '状态',\r\n" + 
        		"  `deleted` boolean NULL COMMENT '删除标识',\r\n" + 
        		"  `create_by` bigint NULL COMMENT '创建人',\r\n" + 
        		"  `create_time` datetime NULL COMMENT '创建时间',\r\n" + 
        		"  `update_by` bigint NULL COMMENT '修改人',\r\n" + 
        		"  `update_time` datetime  NOT NULL COMMENT '修改时间',\r\n" + 
        		"  `business_time` datetime  NOT NULL COMMENT '业务时间'\r\n" + 
        		") ENGINE=OLAP \r\n" + 
        		"UNIQUE KEY(`id`) \r\n" + 
        		"COMMENT '住院用药' \r\n" + 
        		"DISTRIBUTED BY HASH(`id`) BUCKETS 10 \r\n" + 
        		"PROPERTIES ( \r\n" + 
        		"\"replication_allocation\" = \"tag.location.default: 1\", \r\n" + 
        		"\"is_being_synced\" = \"false\", \r\n" + 
        		"\"storage_format\" = \"V2\", \r\n" + 
        		"\"light_schema_change\" = \"true\", \r\n" + 
        		"\"disable_auto_compaction\" = \"false\", \r\n" + 
        		"\"enable_single_replica_compaction\" = \"false\");\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"CREATE TABLE IF NOT EXISTS `ygt_db`.`inpatient_sett` (\r\n" + 
        		"  `id` bigint  NOT NULL COMMENT 'ID',\r\n" + 
        		"  `org_id` bigint NULL COMMENT '机构标识',\r\n" + 
        		"  `org_code` varchar(50)  NOT NULL COMMENT '机构编码',\r\n" + 
        		"  `org_name` varchar(50)  NOT NULL COMMENT '机构名称',\r\n" + 
        		"  `card_no` varchar(36) NULL COMMENT '居民健康卡号',\r\n" + 
        		"  `id_type_code` varchar(2) NULL COMMENT '身份证件类别代码',\r\n" + 
        		"  `id_type_name` varchar(20) NULL COMMENT '身份证件类别名称',\r\n" + 
        		"  `id_no` varchar(128) NULL COMMENT '身份证件号码',\r\n" + 
        		"  `inpat_form_no` varchar(128)  NOT NULL COMMENT '住院记录表编号',\r\n" + 
        		"  `bill_number` varchar(128)  NOT NULL COMMENT '结算号',\r\n" + 
        		"  `invoice_number` varchar(128) NULL COMMENT '发票号',\r\n" + 
        		"  `pay_way_code` varchar(2)  NOT NULL COMMENT '医疗付款方式代码',\r\n" + 
        		"  `pay_way_name` varchar(20)  NOT NULL COMMENT '医疗付款方式名称',\r\n" + 
        		"  `inpat_settle_way_code` varchar(2) NULL COMMENT '住院费用结算方式代码',\r\n" + 
        		"  `inpat_settle_way_name` varchar(10) NULL COMMENT '住院费用结算方式名称',\r\n" + 
        		"  `sec_type_code` varchar(2)  NOT NULL COMMENT '保险类型代码',\r\n" + 
        		"  `sec_type_name` varchar(20)  NOT NULL COMMENT '保险类型名称',\r\n" + 
        		"  `sec_no` varchar(128) NULL COMMENT '医疗保险号',\r\n" + 
        		"  `cost` decimal(12,4)  NOT NULL COMMENT '总费用',\r\n" + 
        		"  `charges` decimal(12,4) NULL COMMENT '个人现金支付',\r\n" + 
        		"  `reduced_payment` decimal(12,4) NULL COMMENT '减免现金',\r\n" + 
        		"  `insurance_account_charges` decimal(12,4) NULL COMMENT '医保个人账户支付',\r\n" + 
        		"  `insurance_fund` decimal(12,4) NULL COMMENT '医保统筹基金支付',\r\n" + 
        		"  `other_payment` decimal(12,4) NULL COMMENT '其他支付',\r\n" + 
        		"  `drgs_flag` varchar(1) NULL COMMENT '单病种付费标识',\r\n" + 
        		"  `insur_balance` decimal(12,4) NULL COMMENT '医保余额',\r\n" + 
        		"  `contract_unit` varchar(128) NULL COMMENT '结算单位',\r\n" + 
        		"  `settle_date` datetime  NOT NULL COMMENT '结算日期',\r\n" + 
        		"  `operator` varchar(40) NULL COMMENT '结算员',\r\n" + 
        		"  `guid` varchar(36) NULL COMMENT '唯一GUID号',\r\n" + 
        		"  `rcd_idcard` varchar(18) NULL COMMENT '结算员身份证号',\r\n" + 
        		"  `mob_pay` varchar(1) NULL COMMENT '移动支付标识',\r\n" + 
        		"  `int_mark` varchar(1) NULL COMMENT '互联网收费标识',\r\n" + 
        		"  `state` int NULL COMMENT '状态',\r\n" + 
        		"  `deleted` boolean NULL COMMENT '删除标识',\r\n" + 
        		"  `create_by` bigint NULL COMMENT '创建人',\r\n" + 
        		"  `create_time` datetime NULL COMMENT '创建时间',\r\n" + 
        		"  `update_by` bigint NULL COMMENT '修改人',\r\n" + 
        		"  `update_time` datetime  NOT NULL COMMENT '修改时间',\r\n" + 
        		"  `business_time` datetime  NOT NULL COMMENT '业务时间'\r\n" + 
        		") ENGINE=OLAP \r\n" + 
        		"UNIQUE KEY(`id`) \r\n" + 
        		"COMMENT '住院费用结算' \r\n" + 
        		"DISTRIBUTED BY HASH(`id`) BUCKETS 10 \r\n" + 
        		"PROPERTIES ( \r\n" + 
        		"\"replication_allocation\" = \"tag.location.default: 1\", \r\n" + 
        		"\"is_being_synced\" = \"false\", \r\n" + 
        		"\"storage_format\" = \"V2\", \r\n" + 
        		"\"light_schema_change\" = \"true\", \r\n" + 
        		"\"disable_auto_compaction\" = \"false\", \r\n" + 
        		"\"enable_single_replica_compaction\" = \"false\");\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"CREATE TABLE IF NOT EXISTS `ygt_db`.`inpatient_fee` (\r\n" + 
        		"  `id` bigint  NOT NULL COMMENT 'ID',\r\n" + 
        		"  `org_id` bigint NULL COMMENT '机构标识',\r\n" + 
        		"  `org_code` varchar(50)  NOT NULL COMMENT '机构编码',\r\n" + 
        		"  `org_name` varchar(50)  NOT NULL COMMENT '机构名称',\r\n" + 
        		"  `card_no` varchar(36) NULL COMMENT '居民健康卡号',\r\n" + 
        		"  `id_type_code` varchar(2) NULL COMMENT '身份证件类别代码',\r\n" + 
        		"  `id_type_name` varchar(20) NULL COMMENT '身份证件类别名称',\r\n" + 
        		"  `id_no` varchar(128) NULL COMMENT '身份证件号码',\r\n" + 
        		"  `inpat_form_no` varchar(128)  NOT NULL COMMENT '住院记录表编号',\r\n" + 
        		"  `biz_id` varchar(128)  NOT NULL COMMENT '序列号',\r\n" + 
        		"  `bill_number` varchar(128)  NOT NULL COMMENT '结算号',\r\n" + 
        		"  `inpat_fee_type_name` varchar(20)  NOT NULL COMMENT '住院费用分类名称',\r\n" + 
        		"  `inpat_fee_type_code` varchar(2)  NOT NULL COMMENT '住院费用分类代码',\r\n" + 
        		"  `inpat_fee_amount` decimal(12,4)  NOT NULL COMMENT '住院费用金额(元)',\r\n" + 
        		"  `price_item_local_code` varchar(128)  NOT NULL COMMENT '价项院内代码',\r\n" + 
        		"  `price_item_local_name` varchar(128)  NOT NULL COMMENT '价项院内名称',\r\n" + 
        		"  `price_item_std_code` varchar(20)  NOT NULL COMMENT '价项标准代码',\r\n" + 
        		"  `price_item_std_name` varchar(128)  NOT NULL COMMENT '价项标准名称',\r\n" + 
        		"  `deduct_fees_dtime` datetime  NOT NULL COMMENT '扣费日期',\r\n" + 
        		"  `spec` varchar(50) NULL COMMENT '规格',\r\n" + 
        		"  `unit` varchar(20)  NOT NULL COMMENT '单位',\r\n" + 
        		"  `price` decimal(12,4)  NOT NULL COMMENT '单价',\r\n" + 
        		"  `quantity` decimal(12,2)  NOT NULL COMMENT '数量',\r\n" + 
        		"  `notes` varchar(4000) NULL COMMENT '备注',\r\n" + 
        		"  `baby_flag` varchar(1) NULL COMMENT '婴儿标志',\r\n" + 
        		"  `apply_dept_code` varchar(30)  NOT NULL COMMENT '开单科室代码',\r\n" + 
        		"  `apply_dept_name` varchar(40)  NOT NULL COMMENT '开单科室名称',\r\n" + 
        		"  `apply_doctor_code` varchar(30)  NOT NULL COMMENT '开单医生代码',\r\n" + 
        		"  `apply_doctor` varchar(40)  NOT NULL COMMENT '开单医生',\r\n" + 
        		"  `exec_dept_code` varchar(9)  NOT NULL COMMENT '执行科室代码',\r\n" + 
        		"  `exec_dept_name` varchar(40)  NOT NULL COMMENT '执行科室名称',\r\n" + 
        		"  `exec_man_code` varchar(30) NULL COMMENT '执行医生代码',\r\n" + 
        		"  `exec_man` varchar(40) NULL COMMENT '执行医生',\r\n" + 
        		"  `operator` varchar(128) NULL COMMENT '操作员',\r\n" + 
        		"  `charge_refund` smallint NULL COMMENT '记账/退费标志',\r\n" + 
        		"  `charge_refund_name` varchar(2) NULL COMMENT '记账/退费名称',\r\n" + 
        		"  `if_medi_insu` varchar(1) NULL COMMENT '是否属于医保项目',\r\n" + 
        		"  `rcd_idcard` varchar(18) NULL COMMENT '记账员身份证号',\r\n" + 
        		"  `pay_way_code` varchar(2) NULL COMMENT '医疗付款方式代码',\r\n" + 
        		"  `pay_way_name` varchar(20) NULL COMMENT '医疗付款方式名称',\r\n" + 
        		"  `self_payment` decimal(12,4) NULL COMMENT '个人承担费用金额',\r\n" + 
        		"  `charges` decimal(12,4) NULL COMMENT '医保个人账户支付',\r\n" + 
        		"  `insurance_charges` decimal(12,4) NULL COMMENT '医保金额',\r\n" + 
        		"  `derate_charges` decimal(12,4) NULL COMMENT '减免金额',\r\n" + 
        		"  `cinsur_percent` decimal(12,4) NULL COMMENT '医保自费比例',\r\n" + 
        		"  `inpat_settle_way_code` varchar(2) NULL COMMENT '住院费用结算方式代码',\r\n" + 
        		"  `inpat_settle_way_name` varchar(10) NULL COMMENT '住院费用结算方式名称',\r\n" + 
        		"  `state` int NULL COMMENT '状态',\r\n" + 
        		"  `deleted` boolean NULL COMMENT '删除标识',\r\n" + 
        		"  `create_by` bigint NULL COMMENT '创建人',\r\n" + 
        		"  `create_time` datetime NULL COMMENT '创建时间',\r\n" + 
        		"  `update_by` bigint NULL COMMENT '修改人',\r\n" + 
        		"  `update_time` datetime  NOT NULL COMMENT '修改时间',\r\n" + 
        		"  `business_time` datetime  NOT NULL COMMENT '业务时间'\r\n" + 
        		") ENGINE=OLAP \r\n" + 
        		"UNIQUE KEY(`id`) \r\n" + 
        		"COMMENT '住院费用明细' \r\n" + 
        		"DISTRIBUTED BY HASH(`id`) BUCKETS 10 \r\n" + 
        		"PROPERTIES ( \r\n" + 
        		"\"replication_allocation\" = \"tag.location.default: 1\", \r\n" + 
        		"\"is_being_synced\" = \"false\", \r\n" + 
        		"\"storage_format\" = \"V2\", \r\n" + 
        		"\"light_schema_change\" = \"true\", \r\n" + 
        		"\"disable_auto_compaction\" = \"false\", \r\n" + 
        		"\"enable_single_replica_compaction\" = \"false\");\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"CREATE TABLE IF NOT EXISTS `ygt_db`.`inpatient_diag` (\r\n" + 
        		"  `id` bigint  NOT NULL COMMENT 'ID',\r\n" + 
        		"  `org_id` bigint NULL COMMENT '机构标识',\r\n" + 
        		"  `org_code` varchar(50)  NOT NULL COMMENT '机构编码',\r\n" + 
        		"  `org_name` varchar(50)  NOT NULL COMMENT '机构名称',\r\n" + 
        		"  `card_no` varchar(36) NULL COMMENT '居民健康卡号',\r\n" + 
        		"  `id_type_code` varchar(2) NULL COMMENT '身份证件类别代码',\r\n" + 
        		"  `id_type_name` varchar(20) NULL COMMENT '身份证件类别名称',\r\n" + 
        		"  `id_no` varchar(128) NULL COMMENT '身份证件号码',\r\n" + 
        		"  `inpat_form_no` varchar(128)  NOT NULL COMMENT '住院记录表编号',\r\n" + 
        		"  `diagnosis_id` varchar(128)  NOT NULL COMMENT '症状序列号',\r\n" + 
        		"  `out_diag_code` varchar(24)  NOT NULL COMMENT '诊断代码（中西医）',\r\n" + 
        		"  `out_diag_name` varchar(50)  NOT NULL COMMENT '诊断名称（中西医）',\r\n" + 
        		"  `diagnosis_z_cd` varchar(20) NULL COMMENT '中医证候编码',\r\n" + 
        		"  `diagnosis_z_name` varchar(200) NULL COMMENT '中医证候名称',\r\n" + 
        		"  `confirmed_diag_date` datetime NULL COMMENT '确诊日期',\r\n" + 
        		"  `treat_result_code` varchar(1) NULL COMMENT '治疗结果代码',\r\n" + 
        		"  `treat_result_name` varchar(2) NULL COMMENT '治疗结果',\r\n" + 
        		"  `clinical_pathway_flag` varchar(1) NULL COMMENT '规范临床路径管理标识',\r\n" + 
        		"  `property_code` varchar(1)  NOT NULL COMMENT '性质代码',\r\n" + 
        		"  `property` varchar(2)  NOT NULL COMMENT '性质',\r\n" + 
        		"  `diag_explan` varchar(4000) NULL COMMENT '诊断说明',\r\n" + 
        		"  `diag_type_code` varchar(2)  NOT NULL COMMENT '诊断类型代码',\r\n" + 
        		"  `diag_type_code_name` varchar(20)  NOT NULL COMMENT '诊断类型代码名称',\r\n" + 
        		"  `diag_type` varchar(1)  NOT NULL COMMENT '中西医诊断标识',\r\n" + 
        		"  `diag_type_name` varchar(10)  NOT NULL COMMENT '中西医诊断标识名称',\r\n" + 
        		"  `diagnose_doctor_code` varchar(30) NULL COMMENT '诊断医师编号',\r\n" + 
        		"  `diagnose_doctor_name` varchar(40) NULL COMMENT '诊断医师姓名',\r\n" + 
        		"  `mast_mark` varchar(1) NULL COMMENT '主要诊断标志',\r\n" + 
        		"  `adm_cond_type_code` varchar(1) NULL COMMENT '入院病情类型编码',\r\n" + 
        		"  `adm_cond_type_name` varchar(10) NULL COMMENT '入院病情类型名称',\r\n" + 
        		"  `diag_result_code` varchar(2) NULL COMMENT '诊断结果',\r\n" + 
        		"  `diag_result_name` varchar(2) NULL COMMENT '诊断结果名称',\r\n" + 
        		"  `state` int NULL COMMENT '状态',\r\n" + 
        		"  `deleted` boolean NULL COMMENT '删除标识',\r\n" + 
        		"  `create_by` bigint NULL COMMENT '创建人',\r\n" + 
        		"  `create_time` datetime NULL COMMENT '创建时间',\r\n" + 
        		"  `update_by` bigint NULL COMMENT '修改人',\r\n" + 
        		"  `update_time` datetime  NOT NULL COMMENT '修改时间',\r\n" + 
        		"  `business_time` datetime  NOT NULL COMMENT '业务时间'\r\n" + 
        		") ENGINE=OLAP \r\n" + 
        		"UNIQUE KEY(`id`) \r\n" + 
        		"COMMENT '住院诊断' \r\n" + 
        		"DISTRIBUTED BY HASH(`id`) BUCKETS 10 \r\n" + 
        		"PROPERTIES ( \r\n" + 
        		"\"replication_allocation\" = \"tag.location.default: 1\", \r\n" + 
        		"\"is_being_synced\" = \"false\", \r\n" + 
        		"\"storage_format\" = \"V2\", \r\n" + 
        		"\"light_schema_change\" = \"true\", \r\n" + 
        		"\"disable_auto_compaction\" = \"false\", \r\n" + 
        		"\"enable_single_replica_compaction\" = \"false\");\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"CREATE TABLE IF NOT EXISTS `ygt_db`.`oper_record` (\r\n" + 
        		"  `id` bigint  NOT NULL COMMENT 'ID',\r\n" + 
        		"  `org_id` bigint NULL COMMENT '机构标识',\r\n" + 
        		"  `org_code` varchar(50)  NOT NULL COMMENT '机构编码',\r\n" + 
        		"  `org_name` varchar(50)  NOT NULL COMMENT '机构名称',\r\n" + 
        		"  `id_type_code` varchar(2) NULL COMMENT '身份证件类别代码',\r\n" + 
        		"  `id_type_name` varchar(20) NULL COMMENT '身份证件类别名称',\r\n" + 
        		"  `id_no` varchar(128) NULL COMMENT '身份证件号码',\r\n" + 
        		"  `patient_id` varchar(128)  NOT NULL COMMENT '病人ID',\r\n" + 
        		"  `name` varchar(40)  NOT NULL COMMENT '患者姓名',\r\n" + 
        		"  `sex_code` varchar(1) NULL COMMENT '患者性别编码',\r\n" + 
        		"  `gender` varchar(10) NULL COMMENT '患者性别',\r\n" + 
        		"  `age` smallint NULL COMMENT '患者年龄',\r\n" + 
        		"  `ward` varchar(50) NULL COMMENT '所在病区',\r\n" + 
        		"  `dept_room` varchar(10) NULL COMMENT '病房号',\r\n" + 
        		"  `bed` varchar(10) NULL COMMENT '床号',\r\n" + 
        		"  `event_type` smallint  NOT NULL COMMENT '事件类型',\r\n" + 
        		"  `event_type_name` varchar(10)  NOT NULL COMMENT '事件类型名称',\r\n" + 
        		"  `event_no` varchar(128)  NOT NULL COMMENT '事件号',\r\n" + 
        		"  `oper_form_no` varchar(128)  NOT NULL COMMENT '手术记录表单号',\r\n" + 
        		"  `author_dtime` datetime NULL COMMENT '记录时间',\r\n" + 
        		"  `author_id` varchar(30) NULL COMMENT '记录者：编号',\r\n" + 
        		"  `author_name` varchar(40) NULL COMMENT '记录者：姓名',\r\n" + 
        		"  `surgeon_id` varchar(30) NULL COMMENT '手术医师：编号',\r\n" + 
        		"  `surgeon_name` varchar(40) NULL COMMENT '手术医师：姓名',\r\n" + 
        		"  `op_doc_idcard` varchar(18) NULL COMMENT '手术医生身份证号码',\r\n" + 
        		"  `assistant1_id` varchar(30) NULL COMMENT 'Ⅰ助：编号',\r\n" + 
        		"  `assistant1_name` varchar(40) NULL COMMENT 'Ⅰ助：姓名',\r\n" + 
        		"  `assistant2_id` varchar(30) NULL COMMENT 'Ⅱ助：编号',\r\n" + 
        		"  `assistant2_name` varchar(40) NULL COMMENT 'Ⅱ助：姓名',\r\n" + 
        		"  `third_assistant_id` varchar(30) NULL COMMENT '第三助手',\r\n" + 
        		"  `third_assistant` varchar(40) NULL COMMENT '第三助手姓名',\r\n" + 
        		"  `anesthesiologist_id` varchar(30) NULL COMMENT '麻醉医师：编号',\r\n" + 
        		"  `anesthesiologist_name` varchar(40) NULL COMMENT '麻醉医师：姓名',\r\n" + 
        		"  `anes_idcard` varchar(18) NULL COMMENT '麻醉医师身份证号',\r\n" + 
        		"  `operation_dtime` datetime NULL COMMENT '手术(操作)日期时间',\r\n" + 
        		"  `operation_end_time` datetime NULL COMMENT '手术结束日期时间',\r\n" + 
        		"  `plan_operation_time` datetime NULL COMMENT '计划手术时间',\r\n" + 
        		"  `pre_diagnosis` varchar(24) NULL COMMENT '术前诊断',\r\n" + 
        		"  `pre_diagnosis_name` varchar(50) NULL COMMENT '术前诊断名称',\r\n" + 
        		"  `mid_diagnosis` varchar(24) NULL COMMENT '术中诊断',\r\n" + 
        		"  `mid_diagnosis_name` varchar(50) NULL COMMENT '术中诊断名称',\r\n" + 
        		"  `op_aft_diag_code` varchar(24) NULL COMMENT '术后诊断代码',\r\n" + 
        		"  `op_aft_diag` varchar(50) NULL COMMENT '术后诊断',\r\n" + 
        		"  `op_fit_flag` varchar(1) NULL COMMENT '术前术后诊断一致性标识',\r\n" + 
        		"  `clinical_diagnose_id` varchar(24) NULL COMMENT '临床诊断',\r\n" + 
        		"  `clinical_diagnose` varchar(50) NULL COMMENT '临床诊断名称',\r\n" + 
        		"  `operation_name` varchar(128) NULL COMMENT '手术/操作-名称',\r\n" + 
        		"  `operation_code` varchar(24) NULL COMMENT '手术(操作)代码',\r\n" + 
        		"  `operation_site_code` varchar(128) NULL COMMENT '手术/操作-目标部位代码',\r\n" + 
        		"  `operation_site_name` varchar(128) NULL COMMENT '手术/操作-目标部位名称',\r\n" + 
        		"  `incision_healing_code` varchar(1) NULL COMMENT '切口愈合等级代码',\r\n" + 
        		"  `incision_healing_name` varchar(2) NULL COMMENT '切口愈合等级代码名称',\r\n" + 
        		"  `operation_course` varchar(2000) NULL COMMENT '手术经过',\r\n" + 
        		"  `intervention` varchar(200) NULL COMMENT '介入物名称',\r\n" + 
        		"  `op_position_code` varchar(1) NULL COMMENT '手术体位代码',\r\n" + 
        		"  `op_position_name` varchar(10) NULL COMMENT '手术体位代码名称',\r\n" + 
        		"  `oper_exp` varchar(80) NULL COMMENT '手术体位描述',\r\n" + 
        		"  `operation_describe` varchar(2000) NULL COMMENT '手术过程描述',\r\n" + 
        		"  `skin_thimerosal` varchar(4000) NULL COMMENT '皮肤消毒描述',\r\n" + 
        		"  `wound_descr` varchar(4000) NULL COMMENT '手术切口描述',\r\n" + 
        		"  `wound_class_code` varchar(1) NULL COMMENT '手术切口类别代码',\r\n" + 
        		"  `wound_class_name` varchar(10) NULL COMMENT '手术切口类别代码名称',\r\n" + 
        		"  `operation_state_code` varchar(64) NULL COMMENT '手术状态代码',\r\n" + 
        		"  `operation_state` varchar(64) NULL COMMENT '手术状态',\r\n" + 
        		"  `expected_operation_length` decimal(5,2) NULL COMMENT '预期手术时长',\r\n" + 
        		"  `op_history_mark` varchar(1) NULL COMMENT '手术史标志',\r\n" + 
        		"  `pick_op_mark` varchar(1) NULL COMMENT '择期手术标识',\r\n" + 
        		"  `op_daytime_mark` varchar(1) NULL COMMENT '日间手术标志',\r\n" + 
        		"  `drain_flag` varchar(1) NULL COMMENT '引流标志',\r\n" + 
        		"  `operation_bleed_amount` int NULL COMMENT '出血量',\r\n" + 
        		"  `infusion_amount` bigint NULL COMMENT '输液量',\r\n" + 
        		"  `transfusion_amount` bigint NULL COMMENT '输血量',\r\n" + 
        		"  `op_pre_drug` varchar(2000) NULL COMMENT '术前用药',\r\n" + 
        		"  `op_drug` varchar(2000) NULL COMMENT '术中用药',\r\n" + 
        		"  `drain_material_name` varchar(2000) NULL COMMENT '引流材料名称',\r\n" + 
        		"  `drain_material_amount` varchar(200) NULL COMMENT '引流材料数量',\r\n" + 
        		"  `placed_part` varchar(200) NULL COMMENT '放置部位',\r\n" + 
        		"  `transfuse_reaction_flag` varchar(1) NULL COMMENT '输血反应标志',\r\n" + 
        		"  `hand_washing_nurse_id` varchar(30) NULL COMMENT '洗手护士',\r\n" + 
        		"  `hand_washing_nurse` varchar(40) NULL COMMENT '洗手护士姓名',\r\n" + 
        		"  `device_nurse_id` varchar(30) NULL COMMENT '器械护士编号',\r\n" + 
        		"  `device_nurse_name` varchar(40) NULL COMMENT '器械护士姓名',\r\n" + 
        		"  `tour_nurse_id` varchar(30) NULL COMMENT '巡台护士编号',\r\n" + 
        		"  `tour_nurse_name` varchar(40) NULL COMMENT '巡台护士姓名',\r\n" + 
        		"  `asepsis_mark` varchar(1) NULL COMMENT '无菌手术标志',\r\n" + 
        		"  `operation_des` varchar(400) NULL COMMENT '非结构化手术/操作',\r\n" + 
        		"  `anesmethod_code` varchar(2) NULL COMMENT '麻醉方法代码',\r\n" + 
        		"  `anesmethod_name` varchar(20) NULL COMMENT '麻醉方法名称',\r\n" + 
        		"  `anes_record` varchar(4000) NULL COMMENT '麻醉记录内容',\r\n" + 
        		"  `oper_nnis` varchar(1) NULL COMMENT '手术级别代码',\r\n" + 
        		"  `oper_nnis_name` varchar(10) NULL COMMENT '手术级别名称',\r\n" + 
        		"  `if_info_con` varchar(1) NULL COMMENT '是否签知情同意书代码',\r\n" + 
        		"  `anesthesia_project` varchar(64) NULL COMMENT '麻醉项目',\r\n" + 
        		"  `anesthesia_count` smallint NULL COMMENT '麻醉数量',\r\n" + 
        		"  `anesthesia_start_time` datetime NULL COMMENT '麻醉开始时间',\r\n" + 
        		"  `anesthesia_end_time` datetime NULL COMMENT '麻醉结束时间',\r\n" + 
        		"  `anesthesia_state_code` varchar(1) NULL COMMENT '麻醉状态编码',\r\n" + 
        		"  `anesthesia_state` varchar(10) NULL COMMENT '麻醉状态名称',\r\n" + 
        		"  `anesthesia_room_id` varchar(30) NULL COMMENT '麻醉室名称编号',\r\n" + 
        		"  `anesthesia_room` varchar(40) NULL COMMENT '麻醉室名称',\r\n" + 
        		"  `anesthesia_dept_code` varchar(30) NULL COMMENT '麻醉科室编号',\r\n" + 
        		"  `anesthesia_dept` varchar(40) NULL COMMENT '麻醉科室',\r\n" + 
        		"  `apply_dept_code` varchar(30) NULL COMMENT '申请科室编号',\r\n" + 
        		"  `apply_dept` varchar(40) NULL COMMENT '申请科室',\r\n" + 
        		"  `exec_dept_code` varchar(30) NULL COMMENT '执行科室编号',\r\n" + 
        		"  `exec_dept` varchar(40) NULL COMMENT '执行科室',\r\n" + 
        		"  `operating_theater_id` varchar(30) NULL COMMENT '手术室',\r\n" + 
        		"  `operating_theater` varchar(40) NULL COMMENT '手术室名称',\r\n" + 
        		"  `operation_room_id` varchar(30) NULL COMMENT '手术间',\r\n" + 
        		"  `operation_room` varchar(40) NULL COMMENT '手术间名称',\r\n" + 
        		"  `operation_count` smallint NULL COMMENT '手术数量',\r\n" + 
        		"  `order_remark` varchar(1000) NULL COMMENT '医嘱备注',\r\n" + 
        		"  `drug_allergy_mark` varchar(1) NULL COMMENT '药物过敏标志',\r\n" + 
        		"  `carry_operation_mark` varchar(1) NULL COMMENT '新开展手术标志',\r\n" + 
        		"  `frozen_pathology_mark` varchar(1) NULL COMMENT '冰冻病理标志',\r\n" + 
        		"  `operation_type_code` varchar(64) NULL COMMENT '手术类型',\r\n" + 
        		"  `operation_type` varchar(64) NULL COMMENT '手术类型名称',\r\n" + 
        		"  `special_use` varchar(128) NULL COMMENT '特殊用物',\r\n" + 
        		"  `special_instrument` varchar(128) NULL COMMENT '特殊仪器',\r\n" + 
        		"  `special_prepare` varchar(128) NULL COMMENT '特殊准备',\r\n" + 
        		"  `need_attention` varchar(2000) NULL COMMENT '注意事项',\r\n" + 
        		"  `abo_code` varchar(1) NULL COMMENT 'ABO血型代码',\r\n" + 
        		"  `abo_name` varchar(10) NULL COMMENT 'ABO血型名称',\r\n" + 
        		"  `state` int NULL COMMENT '状态',\r\n" + 
        		"  `deleted` boolean NULL COMMENT '删除标识',\r\n" + 
        		"  `create_by` bigint NULL COMMENT '创建人',\r\n" + 
        		"  `create_time` datetime NULL COMMENT '创建时间',\r\n" + 
        		"  `update_by` bigint NULL COMMENT '修改人',\r\n" + 
        		"  `update_time` datetime  NOT NULL COMMENT '修改时间',\r\n" + 
        		"  `business_time` datetime  NOT NULL COMMENT '业务时间'\r\n" + 
        		") ENGINE=OLAP \r\n" + 
        		"UNIQUE KEY(`id`) \r\n" + 
        		"COMMENT '手术记录' \r\n" + 
        		"DISTRIBUTED BY HASH(`id`) BUCKETS 10 \r\n" + 
        		"PROPERTIES ( \r\n" + 
        		"\"replication_allocation\" = \"tag.location.default: 1\", \r\n" + 
        		"\"is_being_synced\" = \"false\", \r\n" + 
        		"\"storage_format\" = \"V2\", \r\n" + 
        		"\"light_schema_change\" = \"true\", \r\n" + 
        		"\"disable_auto_compaction\" = \"false\", \r\n" + 
        		"\"enable_single_replica_compaction\" = \"false\");\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"CREATE TABLE IF NOT EXISTS `ygt_db`.`report_indaily` (\r\n" + 
        		"  `id` bigint  NOT NULL COMMENT 'ID',\r\n" + 
        		"  `org_id` bigint NULL COMMENT '机构标识',\r\n" + 
        		"  `org_code` varchar(50)  NOT NULL COMMENT '机构代码',\r\n" + 
        		"  `org_name` varchar(50)  NOT NULL COMMENT '机构名称',\r\n" + 
        		"  `date_t` datetime  NOT NULL COMMENT '统计业务日期',\r\n" + 
        		"  `dept_code` varchar(30)  NOT NULL COMMENT '科室代码',\r\n" + 
        		"  `dept_name` varchar(40)  NOT NULL COMMENT '科室名称',\r\n" + 
        		"  `admission_number` int  NOT NULL COMMENT '入院人数',\r\n" + 
        		"  `move_in_number` int  NOT NULL COMMENT '转入人数',\r\n" + 
        		"  `now_in_number` int  NOT NULL COMMENT '在院病人数',\r\n" + 
        		"  `refer_out_number` int  NOT NULL COMMENT '转出人数',\r\n" + 
        		"  `discharge_number` int  NOT NULL COMMENT '出院人数',\r\n" + 
        		"  `died_number` int  NOT NULL COMMENT '死亡人数',\r\n" + 
        		"  `critical_number` int  NOT NULL COMMENT '危重人数',\r\n" + 
        		"  `rescue_number` int  NOT NULL COMMENT '危重抢救人数',\r\n" + 
        		"  `rescue_success_number` int  NOT NULL COMMENT '抢救成功人数',\r\n" + 
        		"  `operation` int  NOT NULL COMMENT '手术量',\r\n" + 
        		"  `consult_reg_diag` int  NOT NULL COMMENT '会诊确诊病例数',\r\n" + 
        		"  `consult_total` int  NOT NULL COMMENT '会诊人数',\r\n" + 
        		"  `severe_better_total` int  NOT NULL COMMENT '经过重症监护病情好转重症病人人数',\r\n" + 
        		"  `severe_death_total` int  NOT NULL COMMENT '经过重症监护仍死亡的病人人数',\r\n" + 
        		"  `service_bed` int  NOT NULL COMMENT '特需病房病人占用床日数',\r\n" + 
        		"  `special_care` int  NOT NULL COMMENT '特级护理人数',\r\n" + 
        		"  `care_level_1` int  NOT NULL COMMENT '一级护理人数',\r\n" + 
        		"  `care_level_2` int  NOT NULL COMMENT '二级护理人数',\r\n" + 
        		"  `care_level_3` int  NOT NULL COMMENT '三级护理人数',\r\n" + 
        		"  `std_dept_code` varchar(9)  NOT NULL COMMENT '标准科室编码',\r\n" + 
        		"  `state` int NULL COMMENT '状态',\r\n" + 
        		"  `deleted` boolean NULL COMMENT '删除标识',\r\n" + 
        		"  `create_by` bigint NULL COMMENT '创建人',\r\n" + 
        		"  `create_time` datetime NULL COMMENT '创建时间',\r\n" + 
        		"  `update_by` bigint NULL COMMENT '修改人',\r\n" + 
        		"  `update_time` datetime  NOT NULL COMMENT '修改时间',\r\n" + 
        		"  `business_time` datetime  NOT NULL COMMENT '业务时间'\r\n" + 
        		") ENGINE=OLAP \r\n" + 
        		"UNIQUE KEY(`id`) \r\n" + 
        		"COMMENT '住院诊疗日报' \r\n" + 
        		"DISTRIBUTED BY HASH(`id`) BUCKETS 10 \r\n" + 
        		"PROPERTIES ( \r\n" + 
        		"\"replication_allocation\" = \"tag.location.default: 1\", \r\n" + 
        		"\"is_being_synced\" = \"false\", \r\n" + 
        		"\"storage_format\" = \"V2\", \r\n" + 
        		"\"light_schema_change\" = \"true\", \r\n" + 
        		"\"disable_auto_compaction\" = \"false\", \r\n" + 
        		"\"enable_single_replica_compaction\" = \"false\");\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"CREATE TABLE IF NOT EXISTS `ygt_db`.`report_infee` (\r\n" + 
        		"  `id` bigint  NOT NULL COMMENT 'ID',\r\n" + 
        		"  `org_id` bigint NULL COMMENT '机构标识',\r\n" + 
        		"  `org_code` varchar(50)  NOT NULL COMMENT '机构代码',\r\n" + 
        		"  `org_name` varchar(50)  NOT NULL COMMENT '机构名称',\r\n" + 
        		"  `date_t` datetime  NOT NULL COMMENT '统计业务日期',\r\n" + 
        		"  `dept_code` varchar(30)  NOT NULL COMMENT '科室代码',\r\n" + 
        		"  `dept_name` varchar(40)  NOT NULL COMMENT '科室名称',\r\n" + 
        		"  `fee_bed` decimal(12,4)  NOT NULL COMMENT '床位费',\r\n" + 
        		"  `fee_diagnosis` decimal(12,4)  NOT NULL COMMENT '诊疗费',\r\n" + 
        		"  `fee_exam` decimal(12,4)  NOT NULL COMMENT '检查费',\r\n" + 
        		"  `fee_mri` decimal(12,4)  NOT NULL COMMENT 'MRI费',\r\n" + 
        		"  `fee_ct` decimal(12,4)  NOT NULL COMMENT 'CT费',\r\n" + 
        		"  `fee_color_bscan` decimal(12,4)  NOT NULL COMMENT '彩超费',\r\n" + 
        		"  `fee_treatment` decimal(12,4)  NOT NULL COMMENT '治疗费',\r\n" + 
        		"  `fee_lab_test` decimal(12,4)  NOT NULL COMMENT '化验费',\r\n" + 
        		"  `fee_oxygen` decimal(12,4)  NOT NULL COMMENT '输氧费',\r\n" + 
        		"  `fee_blood` decimal(12,4)  NOT NULL COMMENT '输血费',\r\n" + 
        		"  `fee_operation` decimal(12,4)  NOT NULL COMMENT '手术费',\r\n" + 
        		"  `fee_western_medicine` decimal(12,4)  NOT NULL COMMENT '西药费',\r\n" + 
        		"  `fee_cn_medicine` decimal(12,4)  NOT NULL COMMENT '中成药费',\r\n" + 
        		"  `fee_cn_herbal_medicine` decimal(12,4)  NOT NULL COMMENT '中草药费',\r\n" + 
        		"  `fee_nursing` decimal(12,4)  NOT NULL COMMENT '护理费',\r\n" + 
        		"  `fee_materials` decimal(12,4)  NOT NULL COMMENT '材料费',\r\n" + 
        		"  `fee_anaes` decimal(12,4)  NOT NULL COMMENT '麻醉费',\r\n" + 
        		"  `fee_anaes_others` decimal(12,4)  NOT NULL COMMENT '麻醉相关费',\r\n" + 
        		"  `fee_ambulance` decimal(12,4)  NOT NULL COMMENT '救护车费',\r\n" + 
        		"  `fee_other_1` decimal(12,4)  NOT NULL COMMENT '其他医疗费',\r\n" + 
        		"  `fee_other_2` decimal(12,4)  NOT NULL COMMENT '其他',\r\n" + 
        		"  `fee_total` decimal(12,4)  NOT NULL COMMENT '合计',\r\n" + 
        		"  `std_dept_code` varchar(9)  NOT NULL COMMENT '标准科室编码',\r\n" + 
        		"  `state` int NULL COMMENT '状态',\r\n" + 
        		"  `deleted` boolean NULL COMMENT '删除标识',\r\n" + 
        		"  `create_by` bigint NULL COMMENT '创建人',\r\n" + 
        		"  `create_time` datetime NULL COMMENT '创建时间',\r\n" + 
        		"  `update_by` bigint NULL COMMENT '修改人',\r\n" + 
        		"  `update_time` datetime  NOT NULL COMMENT '修改时间',\r\n" + 
        		"  `business_time` datetime  NOT NULL COMMENT '业务时间'\r\n" + 
        		") ENGINE=OLAP \r\n" + 
        		"UNIQUE KEY(`id`) \r\n" + 
        		"COMMENT '住院费用日报' \r\n" + 
        		"DISTRIBUTED BY HASH(`id`) BUCKETS 10 \r\n" + 
        		"PROPERTIES ( \r\n" + 
        		"\"replication_allocation\" = \"tag.location.default: 1\", \r\n" + 
        		"\"is_being_synced\" = \"false\", \r\n" + 
        		"\"storage_format\" = \"V2\", \r\n" + 
        		"\"light_schema_change\" = \"true\", \r\n" + 
        		"\"disable_auto_compaction\" = \"false\", \r\n" + 
        		"\"enable_single_replica_compaction\" = \"false\");\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"CREATE TABLE IF NOT EXISTS `ygt_db`.`inpatient_longorder` (\r\n" + 
        		"  `id` bigint  NOT NULL COMMENT 'ID',\r\n" + 
        		"  `org_id` bigint NULL COMMENT '机构标识',\r\n" + 
        		"  `org_code` varchar(50)  NOT NULL COMMENT '机构编码',\r\n" + 
        		"  `org_name` varchar(50)  NOT NULL COMMENT '机构名称',\r\n" + 
        		"  `card_no` varchar(36) NULL COMMENT '居民健康卡号',\r\n" + 
        		"  `id_type_code` varchar(2) NULL COMMENT '身份证件类别代码',\r\n" + 
        		"  `id_type_name` varchar(20) NULL COMMENT '身份证件类别名称',\r\n" + 
        		"  `id_no` varchar(128) NULL COMMENT '身份证件号码',\r\n" + 
        		"  `ward_name` varchar(50) NULL COMMENT '病区名称',\r\n" + 
        		"  `weight` decimal(6,2) NULL COMMENT '体重(kg)',\r\n" + 
        		"  `inpat_form_no` varchar(128)  NOT NULL COMMENT '住院记录表编号',\r\n" + 
        		"  `order_id` varchar(128)  NOT NULL COMMENT '医嘱序列号',\r\n" + 
        		"  `advice_no` varchar(20) NULL COMMENT '医嘱组号',\r\n" + 
        		"  `order_dtime` datetime  NOT NULL COMMENT '下嘱时间',\r\n" + 
        		"  `order_doctor_code` varchar(30)  NOT NULL COMMENT '下嘱医生代码',\r\n" + 
        		"  `order_doctor` varchar(40)  NOT NULL COMMENT '下嘱医生',\r\n" + 
        		"  `doc_idcard` varchar(18) NULL COMMENT '开嘱医生身份证号',\r\n" + 
        		"  `check_nurse_code` varchar(30)  NOT NULL COMMENT '校对护士代码',\r\n" + 
        		"  `check_nurse` varchar(40)  NOT NULL COMMENT '校对护士',\r\n" + 
        		"  `order_stop_dtime` datetime  NOT NULL COMMENT '停嘱时间',\r\n" + 
        		"  `order_stop_doctor_code` varchar(30)  NOT NULL COMMENT '停嘱医生代码',\r\n" + 
        		"  `order_stop_doctor` varchar(40)  NOT NULL COMMENT '停嘱医生',\r\n" + 
        		"  `stpdoc_idcard` varchar(18) NULL COMMENT '停止执行医生身份证号',\r\n" + 
        		"  `order_stop_nurse_code` varchar(30)  NOT NULL COMMENT '停嘱护士代码',\r\n" + 
        		"  `order_stop_nurse` varchar(40)  NOT NULL COMMENT '停嘱护士',\r\n" + 
        		"  `order_local_code` varchar(128)  NOT NULL COMMENT '医嘱本地代码',\r\n" + 
        		"  `order_std_code` varchar(128) NULL COMMENT '医嘱标准代码',\r\n" + 
        		"  `order_name` varchar(1000)  NOT NULL COMMENT '医嘱本地名称',\r\n" + 
        		"  `order_freq` varchar(20) NULL COMMENT '频次',\r\n" + 
        		"  `order_freq_desc` varchar(2000) NULL COMMENT '频次描述',\r\n" + 
        		"  `order_form_no` varchar(128)  NOT NULL COMMENT '医嘱单号',\r\n" + 
        		"  `order_item_no` varchar(128) NULL COMMENT '医嘱子项序号',\r\n" + 
        		"  `subject_class_code` varchar(2)  NOT NULL COMMENT '医嘱项目类型代码',\r\n" + 
        		"  `subject_class_name` varchar(10)  NOT NULL COMMENT '医嘱项目类型名称',\r\n" + 
        		"  `plan_start_time` datetime NULL COMMENT '医嘱计划开始日期时间',\r\n" + 
        		"  `plan_end_time` datetime NULL COMMENT '医嘱计划结束日期时间',\r\n" + 
        		"  `reamrk` varchar(4000) NULL COMMENT '医嘱备注信息',\r\n" + 
        		"  `apply_dept_code` varchar(30) NULL COMMENT '医嘱开立科室代码',\r\n" + 
        		"  `apply_dept` varchar(40) NULL COMMENT '医嘱开立科室',\r\n" + 
        		"  `auditor_code` varchar(30) NULL COMMENT '医嘱审核人代码',\r\n" + 
        		"  `auditor_signature` varchar(40) NULL COMMENT '医嘱审核人签名',\r\n" + 
        		"  `audit_time` datetime NULL COMMENT '医嘱审核日期时间',\r\n" + 
        		"  `check_time` datetime NULL COMMENT '医嘱核对日期时间',\r\n" + 
        		"  `performer_code` varchar(30) NULL COMMENT '医嘱执行者代码',\r\n" + 
        		"  `performer_signature` varchar(40) NULL COMMENT '医嘱执行者签名',\r\n" + 
        		"  `perform_time` datetime NULL COMMENT '医嘱执行日期时间',\r\n" + 
        		"  `perform_dept_code` varchar(30)  NOT NULL COMMENT '医嘱执行科室代码',\r\n" + 
        		"  `perform_dept` varchar(40)  NOT NULL COMMENT '医嘱执行科室',\r\n" + 
        		"  `perform_status` varchar(1) NULL COMMENT '医嘱执行状态',\r\n" + 
        		"  `perform_status_name` varchar(10) NULL COMMENT '医嘱执行状态名称',\r\n" + 
        		"  `drug_spec` varchar(40) NULL COMMENT '药品规格描述',\r\n" + 
        		"  `form_code` varchar(6) NULL COMMENT '药品剂型代码',\r\n" + 
        		"  `form_name` varchar(40) NULL COMMENT '药品剂型描述',\r\n" + 
        		"  `single_dose` decimal(10,2) NULL COMMENT '药品使用次剂量',\r\n" + 
        		"  `dose_unit` varchar(20) NULL COMMENT '药品使用剂量单位',\r\n" + 
        		"  `drug_fry` varchar(20) NULL COMMENT '药品使用频率代码',\r\n" + 
        		"  `drug_fry_name` varchar(40) NULL COMMENT '药品使用频率说明',\r\n" + 
        		"  `useway_code` varchar(3) NULL COMMENT '药物使用途径代码',\r\n" + 
        		"  `useway_name` varchar(20) NULL COMMENT '药品使用途径说明',\r\n" + 
        		"  `if_antibiotics` varchar(1) NULL COMMENT '是否属于抗菌药物',\r\n" + 
        		"  `mast_mark` varchar(1) NULL COMMENT '主药标志',\r\n" + 
        		"  `drug_purpose` varchar(100) NULL COMMENT '给药目的',\r\n" + 
        		"  `drug_type_code` varchar(7) NULL COMMENT '药物类型代码',\r\n" + 
        		"  `drug_type_name` varchar(30) NULL COMMENT '药物类型名称',\r\n" + 
        		"  `drug_total_dose` decimal(20,4) NULL COMMENT '药物使用总剂量',\r\n" + 
        		"  `first_times` smallint NULL COMMENT '首次',\r\n" + 
        		"  `last_times` smallint NULL COMMENT '末次',\r\n" + 
        		"  `dripp_speed` smallint NULL COMMENT '滴速',\r\n" + 
        		"  `is_essential` varchar(1) NULL COMMENT '基药标志',\r\n" + 
        		"  `mind_mark` varchar(1) NULL COMMENT '精神药物标志',\r\n" + 
        		"  `ane_mark` varchar(1) NULL COMMENT '麻醉药物标志',\r\n" + 
        		"  `vacc_mark` varchar(1) NULL COMMENT '疫苗标志',\r\n" + 
        		"  `infuse_mark` varchar(1) NULL COMMENT '输液用药标志',\r\n" + 
        		"  `skin_mark` varchar(1) NULL COMMENT '皮试标志',\r\n" + 
        		"  `state` int NULL COMMENT '状态',\r\n" + 
        		"  `deleted` boolean NULL COMMENT '删除标识',\r\n" + 
        		"  `create_by` bigint NULL COMMENT '创建人',\r\n" + 
        		"  `create_time` datetime NULL COMMENT '创建时间',\r\n" + 
        		"  `update_by` bigint NULL COMMENT '修改人',\r\n" + 
        		"  `update_time` datetime  NOT NULL COMMENT '修改时间',\r\n" + 
        		"  `business_time` datetime  NOT NULL COMMENT '业务时间'\r\n" + 
        		") ENGINE=OLAP \r\n" + 
        		"UNIQUE KEY(`id`) \r\n" + 
        		"COMMENT '住院长期医嘱' \r\n" + 
        		"DISTRIBUTED BY HASH(`id`) BUCKETS 10 \r\n" + 
        		"PROPERTIES ( \r\n" + 
        		"\"replication_allocation\" = \"tag.location.default: 1\", \r\n" + 
        		"\"is_being_synced\" = \"false\", \r\n" + 
        		"\"storage_format\" = \"V2\", \r\n" + 
        		"\"light_schema_change\" = \"true\", \r\n" + 
        		"\"disable_auto_compaction\" = \"false\", \r\n" + 
        		"\"enable_single_replica_compaction\" = \"false\");\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"CREATE TABLE IF NOT EXISTS `ygt_db`.`inpatient_proorder` (\r\n" + 
        		"  `id` bigint  NOT NULL COMMENT 'ID',\r\n" + 
        		"  `org_id` bigint NULL COMMENT '机构标识',\r\n" + 
        		"  `org_code` varchar(50)  NOT NULL COMMENT '机构编码',\r\n" + 
        		"  `org_name` varchar(50)  NOT NULL COMMENT '机构名称',\r\n" + 
        		"  `card_no` varchar(36) NULL COMMENT '居民健康卡号',\r\n" + 
        		"  `id_type_code` varchar(2) NULL COMMENT '身份证件类别代码',\r\n" + 
        		"  `id_type_name` varchar(20) NULL COMMENT '身份证件类别名称',\r\n" + 
        		"  `id_no` varchar(128) NULL COMMENT '身份证件号码',\r\n" + 
        		"  `ward_name` varchar(50) NULL COMMENT '病区名称',\r\n" + 
        		"  `weight` decimal(6,2) NULL COMMENT '体重(kg)',\r\n" + 
        		"  `inpat_form_no` varchar(128)  NOT NULL COMMENT '住院记录表编号',\r\n" + 
        		"  `order_id` varchar(128)  NOT NULL COMMENT '医嘱序列号',\r\n" + 
        		"  `advice_no` varchar(20) NULL COMMENT '医嘱组号',\r\n" + 
        		"  `order_dtime` datetime  NOT NULL COMMENT '下嘱时间',\r\n" + 
        		"  `order_doctor_code` varchar(30)  NOT NULL COMMENT '下嘱医生代码',\r\n" + 
        		"  `order_doctor` varchar(40)  NOT NULL COMMENT '下嘱医生',\r\n" + 
        		"  `doc_idcard` varchar(18) NULL COMMENT '开嘱医生身份证号',\r\n" + 
        		"  `check_nurse_code` varchar(30)  NOT NULL COMMENT '校对护士代码',\r\n" + 
        		"  `check_nurse` varchar(40)  NOT NULL COMMENT '校对护士',\r\n" + 
        		"  `perform_nurse_code` varchar(30) NULL COMMENT '执行护士代码',\r\n" + 
        		"  `perform_nurse` varchar(40) NULL COMMENT '执行护士',\r\n" + 
        		"  `perform_dtime` datetime NULL COMMENT '执行时间',\r\n" + 
        		"  `order_local_code` varchar(128)  NOT NULL COMMENT '医嘱本地代码',\r\n" + 
        		"  `order_std_code` varchar(128) NULL COMMENT '医嘱标准代码',\r\n" + 
        		"  `order_name` varchar(1000)  NOT NULL COMMENT '医嘱本地名称',\r\n" + 
        		"  `order_form_no` varchar(128)  NOT NULL COMMENT '医嘱单号',\r\n" + 
        		"  `order_item_no` varchar(128) NULL COMMENT '医嘱子项序号',\r\n" + 
        		"  `subject_class_code` varchar(2)  NOT NULL COMMENT '医嘱项目类型代码',\r\n" + 
        		"  `subject_class_name` varchar(10)  NOT NULL COMMENT '医嘱项目类型名称',\r\n" + 
        		"  `plan_start_time` datetime NULL COMMENT '医嘱计划开始日期时间',\r\n" + 
        		"  `plan_end_time` datetime NULL COMMENT '医嘱计划结束日期时间',\r\n" + 
        		"  `reamrk` varchar(4000) NULL COMMENT '医嘱备注信息',\r\n" + 
        		"  `apply_dept_code` varchar(30) NULL COMMENT '医嘱开立科室代码',\r\n" + 
        		"  `apply_dept` varchar(40) NULL COMMENT '医嘱开立科室',\r\n" + 
        		"  `auditor_code` varchar(30) NULL COMMENT '医嘱审核人代码',\r\n" + 
        		"  `auditor_signature` varchar(40) NULL COMMENT '医嘱审核人签名',\r\n" + 
        		"  `audit_time` datetime NULL COMMENT '医嘱审核日期时间',\r\n" + 
        		"  `check_time` datetime NULL COMMENT '医嘱核对日期时间',\r\n" + 
        		"  `perform_dept_code` varchar(30)  NOT NULL COMMENT '医嘱执行科室代码',\r\n" + 
        		"  `perform_dept` varchar(40)  NOT NULL COMMENT '医嘱执行科室',\r\n" + 
        		"  `perform_status` varchar(1) NULL COMMENT '医嘱执行状态',\r\n" + 
        		"  `perform_status_name` varchar(10) NULL COMMENT '医嘱执行状态名称',\r\n" + 
        		"  `cancel_time` datetime  NOT NULL COMMENT '医嘱取消日期时间',\r\n" + 
        		"  `cancel_operator_code` varchar(30)  NOT NULL COMMENT '取消医嘱者代码',\r\n" + 
        		"  `cancel_operator_signature` varchar(40)  NOT NULL COMMENT '取消医嘱者签名',\r\n" + 
        		"  `stpdoc_idcard` varchar(18) NULL COMMENT '停止执行医生身份证号',\r\n" + 
        		"  `mr_no` varchar(36) NULL COMMENT '病案号',\r\n" + 
        		"  `if_drug` varchar(1) NULL COMMENT '是否药品医嘱',\r\n" + 
        		"  `drug_spec` varchar(40) NULL COMMENT '药品规格描述',\r\n" + 
        		"  `form_code` varchar(6) NULL COMMENT '药品剂型代码',\r\n" + 
        		"  `form_name` varchar(40) NULL COMMENT '药品剂型描述',\r\n" + 
        		"  `single_dose` decimal(10,2) NULL COMMENT '药品使用次剂量',\r\n" + 
        		"  `dose_unit` varchar(20) NULL COMMENT '药品使用剂量单位',\r\n" + 
        		"  `drug_fry` varchar(20) NULL COMMENT '药品使用频率代码',\r\n" + 
        		"  `drug_fry_name` varchar(40) NULL COMMENT '药品使用频率说明',\r\n" + 
        		"  `useway_code` varchar(3) NULL COMMENT '药物使用途径代码',\r\n" + 
        		"  `useway_name` varchar(20) NULL COMMENT '药品使用途径说明',\r\n" + 
        		"  `if_antibiotics` varchar(1) NULL COMMENT '是否属于抗菌药物',\r\n" + 
        		"  `mast_mark` varchar(1) NULL COMMENT '主药标识',\r\n" + 
        		"  `drug_purpose` varchar(100) NULL COMMENT '给药目的',\r\n" + 
        		"  `drug_type_code` varchar(7) NULL COMMENT '药物类型代码',\r\n" + 
        		"  `drug_type_name` varchar(30) NULL COMMENT '药物类型名称',\r\n" + 
        		"  `drug_total_dose` decimal(20,4) NULL COMMENT '药物使用总剂量',\r\n" + 
        		"  `first_times` smallint NULL COMMENT '首次',\r\n" + 
        		"  `last_times` smallint NULL COMMENT '末次',\r\n" + 
        		"  `dripp_speed` smallint NULL COMMENT '滴速',\r\n" + 
        		"  `is_essential` varchar(1) NULL COMMENT '基药标志',\r\n" + 
        		"  `mind_mark` varchar(1) NULL COMMENT '精神药物标志',\r\n" + 
        		"  `ane_mark` varchar(1) NULL COMMENT '麻醉药物标志',\r\n" + 
        		"  `vacc_mark` varchar(1) NULL COMMENT '疫苗标志',\r\n" + 
        		"  `infuse_mark` varchar(1) NULL COMMENT '输液用药标志',\r\n" + 
        		"  `skin_mark` varchar(1) NULL COMMENT '皮试标志',\r\n" + 
        		"  `order_stop_nurse_code` varchar(30)  NOT NULL COMMENT '停嘱护士代码',\r\n" + 
        		"  `order_stop_nurse` varchar(40)  NOT NULL COMMENT '停嘱护士',\r\n" + 
        		"  `state` int NULL COMMENT '状态',\r\n" + 
        		"  `deleted` boolean NULL COMMENT '删除标识',\r\n" + 
        		"  `create_by` bigint NULL COMMENT '创建人',\r\n" + 
        		"  `create_time` datetime NULL COMMENT '创建时间',\r\n" + 
        		"  `update_by` bigint NULL COMMENT '修改人',\r\n" + 
        		"  `update_time` datetime  NOT NULL COMMENT '修改时间',\r\n" + 
        		"  `business_time` datetime  NOT NULL COMMENT '业务时间'\r\n" + 
        		") ENGINE=OLAP \r\n" + 
        		"UNIQUE KEY(`id`) \r\n" + 
        		"COMMENT '住院临时医嘱' \r\n" + 
        		"DISTRIBUTED BY HASH(`id`) BUCKETS 10 \r\n" + 
        		"PROPERTIES ( \r\n" + 
        		"\"replication_allocation\" = \"tag.location.default: 1\", \r\n" + 
        		"\"is_being_synced\" = \"false\", \r\n" + 
        		"\"storage_format\" = \"V2\", \r\n" + 
        		"\"light_schema_change\" = \"true\", \r\n" + 
        		"\"disable_auto_compaction\" = \"false\", \r\n" + 
        		"\"enable_single_replica_compaction\" = \"false\");\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"CREATE TABLE IF NOT EXISTS `ygt_db`.`inpatient_firstpage` (\r\n" + 
        		"  `id` bigint  NOT NULL COMMENT 'ID',\r\n" + 
        		"  `org_id` bigint NULL COMMENT '机构标识',\r\n" + 
        		"  `org_code` varchar(50)  NOT NULL COMMENT '机构编码',\r\n" + 
        		"  `org_name` varchar(50)  NOT NULL COMMENT '机构名称',\r\n" + 
        		"  `id_type_code` varchar(2)  NOT NULL COMMENT '身份证件类别代码',\r\n" + 
        		"  `id_type_name` varchar(20)  NOT NULL COMMENT '身份证件类别名称',\r\n" + 
        		"  `id_no` varchar(128)  NOT NULL COMMENT '身份证件号码',\r\n" + 
        		"  `patient_id` varchar(128)  NOT NULL COMMENT '病人ID',\r\n" + 
        		"  `inpat_form_no` varchar(128)  NOT NULL COMMENT '住院记录表编号',\r\n" + 
        		"  `report_form_no` varchar(128)  NOT NULL COMMENT '病案首页报告单号',\r\n" + 
        		"  `card_no` varchar(36)  NOT NULL COMMENT '居民健康卡号',\r\n" + 
        		"  `in_hospital_times` varchar(10)  NOT NULL COMMENT '住院次数',\r\n" + 
        		"  `case_no` varchar(128)  NOT NULL COMMENT '病案号',\r\n" + 
        		"  `pay_way_code` varchar(2)  NOT NULL COMMENT '医疗付费方式代码',\r\n" + 
        		"  `pay_way_name` varchar(20)  NOT NULL COMMENT '医疗付款方式名称',\r\n" + 
        		"  `name` varchar(40)  NOT NULL COMMENT '姓名',\r\n" + 
        		"  `sex_code` varchar(1)  NOT NULL COMMENT '性别代码',\r\n" + 
        		"  `gender` varchar(10)  NOT NULL COMMENT '患者性别',\r\n" + 
        		"  `birth_date` datetime  NOT NULL COMMENT '出生日期',\r\n" + 
        		"  `age` smallint  NOT NULL COMMENT '年龄',\r\n" + 
        		"  `age_month` varchar(8)  NOT NULL COMMENT '年龄（月）',\r\n" + 
        		"  `age_day` smallint  NOT NULL COMMENT '天数（天）',\r\n" + 
        		"  `age_unit_code` varchar(1) NULL COMMENT '年龄单位代码',\r\n" + 
        		"  `age_unit_name` varchar(20) NULL COMMENT '年龄单位名称',\r\n" + 
        		"  `country_code` varchar(2)  NOT NULL COMMENT '国籍代码',\r\n" + 
        		"  `country_name` varchar(20)  NOT NULL COMMENT '国籍名称',\r\n" + 
        		"  `birth_weight` smallint  NOT NULL COMMENT '新生儿出生体重',\r\n" + 
        		"  `in_weight` smallint  NOT NULL COMMENT '新生儿入院体重(g)',\r\n" + 
        		"  `birth_addr_province` varchar(200)  NOT NULL COMMENT '出生地-省(自治区、直辖市)',\r\n" + 
        		"  `birth_addr_city` varchar(200)  NOT NULL COMMENT '出生地-市(地区、州)',\r\n" + 
        		"  `birth_addr_county` varchar(200)  NOT NULL COMMENT '出生地-县(区)',\r\n" + 
        		"  `birth_addr_town` varchar(200)  NOT NULL COMMENT '出生地-乡(镇、街道办事处)',\r\n" + 
        		"  `birth_addr_village` varchar(200)  NOT NULL COMMENT '出生地-村(街、路、弄等)',\r\n" + 
        		"  `birth_addr_house_no` varchar(200)  NOT NULL COMMENT '出生地-门牌号码',\r\n" + 
        		"  `native_province` varchar(200)  NOT NULL COMMENT '籍贯-省(自治区、直辖市)',\r\n" + 
        		"  `native_city` varchar(200)  NOT NULL COMMENT '籍贯-市(地区、州)',\r\n" + 
        		"  `nationality_code` varchar(2)  NOT NULL COMMENT '民族代码',\r\n" + 
        		"  `nationality_name` varchar(10)  NOT NULL COMMENT '民族名称',\r\n" + 
        		"  `occupation_code` varchar(2)  NOT NULL COMMENT '职业类别代码',\r\n" + 
        		"  `occupation_name` varchar(10)  NOT NULL COMMENT '职业类别代码名称',\r\n" + 
        		"  `marriage_code` varchar(2)  NOT NULL COMMENT '婚姻状况代码',\r\n" + 
        		"  `marriage_name` varchar(10)  NOT NULL COMMENT '婚姻状况',\r\n" + 
        		"  `present_addr_province` varchar(200)  NOT NULL COMMENT '现住地址-省(自治区、直辖市)',\r\n" + 
        		"  `present_addr_city` varchar(200)  NOT NULL COMMENT '现住地址-市(地区、州)',\r\n" + 
        		"  `present_addr_county` varchar(200)  NOT NULL COMMENT '现住地址-县(区)',\r\n" + 
        		"  `present_addr_town` varchar(200)  NOT NULL COMMENT '现住地址-乡(镇、街道办事处)',\r\n" + 
        		"  `present_addr_village` varchar(200)  NOT NULL COMMENT '现住地址-村(街、路、弄等)',\r\n" + 
        		"  `present_addr_house_no` varchar(200)  NOT NULL COMMENT '现住地址-门牌号码',\r\n" + 
        		"  `present_addr_tel_no` varchar(128)  NOT NULL COMMENT '现住地址-电话',\r\n" + 
        		"  `present_addr_postal_code` varchar(6)  NOT NULL COMMENT '现住地址-邮编',\r\n" + 
        		"  `register_addr_province` varchar(200)  NOT NULL COMMENT '户口地址-省(自治区、直辖市)',\r\n" + 
        		"  `register_addr_city` varchar(200)  NOT NULL COMMENT '户籍地址-市(地区、州)',\r\n" + 
        		"  `register_addr_county` varchar(200)  NOT NULL COMMENT '户籍地址-县(区)',\r\n" + 
        		"  `register_addr_town` varchar(200)  NOT NULL COMMENT '户口地址-乡(镇、街道办事处)',\r\n" + 
        		"  `register_addr_village` varchar(200)  NOT NULL COMMENT '户籍地址-村(街、路、弄等)',\r\n" + 
        		"  `register_addr_house_no` varchar(200)  NOT NULL COMMENT '户口地址-门牌号码',\r\n" + 
        		"  `register_addr_postal_code` varchar(6) NULL COMMENT '户口地址-邮编',\r\n" + 
        		"  `employer_name` varchar(70)  NOT NULL COMMENT '工作单位名称',\r\n" + 
        		"  `employer_addr_province` varchar(200)  NOT NULL COMMENT '工作单位地址-省(自治区、直辖市)',\r\n" + 
        		"  `employer_addr_city` varchar(200)  NOT NULL COMMENT '工作单位地址-市(地区、州)',\r\n" + 
        		"  `employer_addr_county` varchar(200)  NOT NULL COMMENT '工作单位地址-县(区)',\r\n" + 
        		"  `employer_addr_town` varchar(200)  NOT NULL COMMENT '工作单位地址-乡(镇、街道办事处)',\r\n" + 
        		"  `employer_addr_village` varchar(200)  NOT NULL COMMENT '工作单位地址-村(街、路、弄等)',\r\n" + 
        		"  `employer_addr_house_no` varchar(200)  NOT NULL COMMENT '工作单位地址-门牌号码',\r\n" + 
        		"  `employer_tel_no` varchar(128)  NOT NULL COMMENT '工作单位-电话',\r\n" + 
        		"  `employer_postal_code` varchar(6)  NOT NULL COMMENT '工作单位-邮编',\r\n" + 
        		"  `contact_name` varchar(128)  NOT NULL COMMENT '联系人-姓名',\r\n" + 
        		"  `contact_relationship_cd` varchar(2)  NOT NULL COMMENT '联系人-关系代码',\r\n" + 
        		"  `contact_relationship_name` varchar(20)  NOT NULL COMMENT '联系人-关系名称',\r\n" + 
        		"  `contact_tel_no` varchar(128)  NOT NULL COMMENT '联系人-电话',\r\n" + 
        		"  `con_addr` varchar(80) NULL COMMENT '联系人地址',\r\n" + 
        		"  `in_path_code` varchar(2)  NOT NULL COMMENT '入院途径代码',\r\n" + 
        		"  `in_path_name` varchar(10)  NOT NULL COMMENT '入院途径名称',\r\n" + 
        		"  `admission_dtime` datetime  NOT NULL COMMENT '入院时间',\r\n" + 
        		"  `in_dept_code` varchar(9)  NOT NULL COMMENT '入院科室编码',\r\n" + 
        		"  `in_dept_name` varchar(40)  NOT NULL COMMENT '入院科室名称',\r\n" + 
        		"  `in_dept_room` varchar(10)  NOT NULL COMMENT '入院病房',\r\n" + 
        		"  `move_dept_code` varchar(9)  NOT NULL COMMENT '转科科室代码',\r\n" + 
        		"  `move_dept_name` varchar(40)  NOT NULL COMMENT '转科科室名称',\r\n" + 
        		"  `discharge_dtime` datetime  NOT NULL COMMENT '出院时间',\r\n" + 
        		"  `out_dept_code` varchar(9)  NOT NULL COMMENT '出院科室代码',\r\n" + 
        		"  `out_dept_name` varchar(40)  NOT NULL COMMENT '出院科室名称',\r\n" + 
        		"  `out_dept_room` varchar(10)  NOT NULL COMMENT '出院病房',\r\n" + 
        		"  `actual_in_days` int  NOT NULL COMMENT '实际住院天数',\r\n" + 
        		"  `outpat_diag_code` varchar(24)  NOT NULL COMMENT '门(急)诊诊断编码',\r\n" + 
        		"  `outpat_diag_name` varchar(50)  NOT NULL COMMENT '门(急)诊诊断名称',\r\n" + 
        		"  `damage_poison_reason` varchar(200)  NOT NULL COMMENT '损伤、中毒的外部原因',\r\n" + 
        		"  `damage_poison_icd_cd` varchar(24)  NOT NULL COMMENT '损伤、中毒的疾病编码',\r\n" + 
        		"  `damage_poison_icd_name` varchar(50)  NOT NULL COMMENT '损伤、中毒的疾病名称',\r\n" + 
        		"  `pathological_no` varchar(128) NULL COMMENT '病理号',\r\n" + 
        		"  `drug_allergy_mark` varchar(1)  NOT NULL COMMENT '药物过敏标志',\r\n" + 
        		"  `drug_allergens_name` varchar(200)  NOT NULL COMMENT '过敏药物',\r\n" + 
        		"  `autopsy_mark` varchar(1)  NOT NULL COMMENT '死亡患者尸检标志',\r\n" + 
        		"  `abo_code` varchar(1)  NOT NULL COMMENT 'ABO血型代码',\r\n" + 
        		"  `abo_name` varchar(10)  NOT NULL COMMENT 'ABO血型名称',\r\n" + 
        		"  `rh_code` varchar(1)  NOT NULL COMMENT 'Rh血型代码',\r\n" + 
        		"  `rh_name` varchar(10)  NOT NULL COMMENT 'Rh血型名称',\r\n" + 
        		"  `dept_director_id` varchar(30)  NOT NULL COMMENT '科主任：编号',\r\n" + 
        		"  `dept_director_name` varchar(40)  NOT NULL COMMENT '科主任：姓名',\r\n" + 
        		"  `chief_doctor_id` varchar(30)  NOT NULL COMMENT '主任(副主任)医师：编号',\r\n" + 
        		"  `chief_doctor_name` varchar(40)  NOT NULL COMMENT '主任(副主任)医师：姓名',\r\n" + 
        		"  `in_charge_doctor_id` varchar(30)  NOT NULL COMMENT '主治医师：编号',\r\n" + 
        		"  `in_charge_doctor_name` varchar(40)  NOT NULL COMMENT '主治医师：姓名',\r\n" + 
        		"  `resident_doctor_id` varchar(30)  NOT NULL COMMENT '住院医师：编号',\r\n" + 
        		"  `resident_doctor_name` varchar(40)  NOT NULL COMMENT '住院医师：姓名',\r\n" + 
        		"  `resp_nurse_id` varchar(30)  NOT NULL COMMENT '责任护士：编号',\r\n" + 
        		"  `resp_nurse_name` varchar(40)  NOT NULL COMMENT '责任护士：姓名',\r\n" + 
        		"  `learning_doctor_id` varchar(30)  NOT NULL COMMENT '进修医师：编号',\r\n" + 
        		"  `learning_doctor_name` varchar(40)  NOT NULL COMMENT '进修医师：姓名',\r\n" + 
        		"  `intern_doctor_id` varchar(30)  NOT NULL COMMENT '实习医师：编号',\r\n" + 
        		"  `intern_doctor_name` varchar(40)  NOT NULL COMMENT '实习医师：姓名',\r\n" + 
        		"  `cataloger_id` varchar(30)  NOT NULL COMMENT '编码员：编号',\r\n" + 
        		"  `cataloger_name` varchar(40)  NOT NULL COMMENT '编码员：姓名',\r\n" + 
        		"  `case_quality_cd` varchar(1)  NOT NULL COMMENT '病案质量代码',\r\n" + 
        		"  `case_quality_name` varchar(20)  NOT NULL COMMENT '病案质量名称',\r\n" + 
        		"  `qc_doctor_id` varchar(30)  NOT NULL COMMENT '质控医师：编号',\r\n" + 
        		"  `qc_doctor_name` varchar(40)  NOT NULL COMMENT '质控医师：姓名',\r\n" + 
        		"  `qc_nurse_id` varchar(30)  NOT NULL COMMENT '质控护士：编号',\r\n" + 
        		"  `qc_nurse_name` varchar(40)  NOT NULL COMMENT '质控护士：姓名',\r\n" + 
        		"  `qc_dtime` datetime  NOT NULL COMMENT '质控日期',\r\n" + 
        		"  `discharge_class_cd` varchar(1)  NOT NULL COMMENT '离院方式代码',\r\n" + 
        		"  `discharge_class_name` varchar(30)  NOT NULL COMMENT '离院方式名称',\r\n" + 
        		"  `order_referral_org` varchar(70)  NOT NULL COMMENT '医嘱转院-医疗机构名称',\r\n" + 
        		"  `rehosp_after31_mark` varchar(1)  NOT NULL COMMENT '出院31天内再住院计划标志',\r\n" + 
        		"  `rehosp_after31_purpose` varchar(100)  NOT NULL COMMENT '出院31天内再住院目的',\r\n" + 
        		"  `coma_duration_before` int  NOT NULL COMMENT '颅脑损伤患者入院前昏迷时间(min)',\r\n" + 
        		"  `coma_duration_after` int  NOT NULL COMMENT '颅脑损伤患者入院后昏迷时间(min)',\r\n" + 
        		"  `coma_duration_before_d` int NULL COMMENT '颅脑损伤患者入院前昏迷时间（day）',\r\n" + 
        		"  `coma_duration_before_h` int NULL COMMENT '颅脑损伤患者入院前昏迷时间（hours）',\r\n" + 
        		"  `coma_duration_after_d` int NULL COMMENT '颅脑损伤患者入院后昏迷时间（day）',\r\n" + 
        		"  `coma_duration_after_h` int NULL COMMENT '颅脑损伤患者入院后昏迷时间（hours）',\r\n" + 
        		"  `fee_total` decimal(12,4)  NOT NULL COMMENT '住院总费用',\r\n" + 
        		"  `fee_self_pay` decimal(12,4) NULL COMMENT '住院自付金额',\r\n" + 
        		"  `fee_general_medical` decimal(12,4)  NOT NULL COMMENT '一般医疗服务费',\r\n" + 
        		"  `fee_general_treat` decimal(12,4)  NOT NULL COMMENT '一般治疗操作费',\r\n" + 
        		"  `fee_tend` decimal(12,4)  NOT NULL COMMENT '护理费',\r\n" + 
        		"  `fee_medical_other` decimal(12,4)  NOT NULL COMMENT '综合医疗服务其他费用',\r\n" + 
        		"  `fee_pathology` decimal(12,4)  NOT NULL COMMENT '病理诊断费',\r\n" + 
        		"  `fee_laboratory` decimal(12,4)  NOT NULL COMMENT '实验室诊断费',\r\n" + 
        		"  `fee_imaging` decimal(12,4)  NOT NULL COMMENT '影像学诊断费',\r\n" + 
        		"  `fee_clinc` decimal(12,4)  NOT NULL COMMENT '临床诊断项目费',\r\n" + 
        		"  `fee_nonsurgical_treat` decimal(12,4)  NOT NULL COMMENT '非手术治疗项目费',\r\n" + 
        		"  `fee_clin_physical` decimal(12,4)  NOT NULL COMMENT '临床物理治疗费',\r\n" + 
        		"  `fee_surgical_treat` decimal(12,4)  NOT NULL COMMENT '手术治疗费',\r\n" + 
        		"  `fee_anaes` decimal(12,4)  NOT NULL COMMENT '麻醉费',\r\n" + 
        		"  `fee_operation` decimal(12,4)  NOT NULL COMMENT '手术费',\r\n" + 
        		"  `fee_recovery` decimal(12,4)  NOT NULL COMMENT '康复费',\r\n" + 
        		"  `fee_cn_treatment` decimal(12,4)  NOT NULL COMMENT '中医治疗费',\r\n" + 
        		"  `fee_western_medicine` decimal(12,4)  NOT NULL COMMENT '西药费',\r\n" + 
        		"  `fee_antimicrobial` decimal(12,4)  NOT NULL COMMENT '抗菌药物费用',\r\n" + 
        		"  `fee_cn_medicine` decimal(12,4)  NOT NULL COMMENT '中成药费',\r\n" + 
        		"  `fee_cn_herbal_medicine` decimal(12,4)  NOT NULL COMMENT '中草药费',\r\n" + 
        		"  `fee_blood` decimal(12,4)  NOT NULL COMMENT '血费',\r\n" + 
        		"  `fee_albumin` decimal(12,4)  NOT NULL COMMENT '白蛋白类制品费',\r\n" + 
        		"  `fee_globulin` decimal(12,4)  NOT NULL COMMENT '球蛋白类制品费',\r\n" + 
        		"  `fee_bcf` decimal(12,4)  NOT NULL COMMENT '凝血因子类制品费',\r\n" + 
        		"  `fee_cytokine` decimal(12,4)  NOT NULL COMMENT '细胞因子类制品费',\r\n" + 
        		"  `fee_check_material` decimal(12,4)  NOT NULL COMMENT '检查用一次性医用材料费',\r\n" + 
        		"  `fee_treat_material` decimal(12,4)  NOT NULL COMMENT '治疗用一次性医用材料费',\r\n" + 
        		"  `fee_oper_material` decimal(12,4)  NOT NULL COMMENT '手术用一次性医用材料费',\r\n" + 
        		"  `fee_other` decimal(12,4)  NOT NULL COMMENT '其他费',\r\n" + 
        		"  `fee_baby` decimal(12,4) NULL COMMENT '婴儿费',\r\n" + 
        		"  `fee_extra_bed` decimal(12,4) NULL COMMENT '陪床费',\r\n" + 
        		"  `fee_bed` decimal(12,4) NULL COMMENT '床位费',\r\n" + 
        		"  `fee_radiation` decimal(12,4) NULL COMMENT '放射费',\r\n" + 
        		"  `fee_assay` decimal(12,4) NULL COMMENT '化验费',\r\n" + 
        		"  `fee_oxygen` decimal(12,4) NULL COMMENT '输氧费用',\r\n" + 
        		"  `fee_deliver` decimal(12,4) NULL COMMENT '接生费',\r\n" + 
        		"  `fee_check` decimal(12,4) NULL COMMENT '检查费',\r\n" + 
        		"  `effective_time` datetime NULL COMMENT '文档创建时间',\r\n" + 
        		"  `death_cause` varchar(128) NULL COMMENT '死亡原因描述',\r\n" + 
        		"  `root_death_code` varchar(24) NULL COMMENT '死亡根本原因诊断代码',\r\n" + 
        		"  `root_death_name` varchar(50) NULL COMMENT '死亡根本原因诊断名称',\r\n" + 
        		"  `infusion_reaction_mark` varchar(1) NULL COMMENT '输液反应标志',\r\n" + 
        		"  `follow_interval` smallint NULL COMMENT '随访时间间隔(天)',\r\n" + 
        		"  `research_example_mark` varchar(1) NULL COMMENT '科研病例标志',\r\n" + 
        		"  `first_operation_mark` varchar(1) NULL COMMENT '手术为本院第一例标志',\r\n" + 
        		"  `first_treatment_mark` varchar(1) NULL COMMENT '治疗为本院第一例标志',\r\n" + 
        		"  `first_exam_mark` varchar(1) NULL COMMENT '检查为本院第一例标志',\r\n" + 
        		"  `first_diagnosis_mark` varchar(1) NULL COMMENT '诊断为本院第一例标志',\r\n" + 
        		"  `infectious_mark` varchar(1) NULL COMMENT '传染性标志',\r\n" + 
        		"  `infectious_type_code` varchar(1) NULL COMMENT '传染病分类代码',\r\n" + 
        		"  `infectious_type_name` varchar(10) NULL COMMENT '传染病分类名称',\r\n" + 
        		"  `infectious_reported_mark` varchar(1) NULL COMMENT '传染病已报标志',\r\n" + 
        		"  `infectiousness_times` smallint NULL COMMENT '感染次数',\r\n" + 
        		"  `insurance_no` varchar(128) NULL COMMENT '医疗保险号',\r\n" + 
        		"  `in_condition_code` varchar(1) NULL COMMENT '入院情况代码',\r\n" + 
        		"  `in_condition_name` varchar(10) NULL COMMENT '入院情况名称',\r\n" + 
        		"  `allergens_code` varchar(3) NULL COMMENT '过敏源代码',\r\n" + 
        		"  `allergens_name` varchar(10) NULL COMMENT '过敏源名称',\r\n" + 
        		"  `hbsag_code` varchar(1) NULL COMMENT 'HbsAg检查结果代码',\r\n" + 
        		"  `hbsag_name` varchar(10) NULL COMMENT 'HbsAg检查结果',\r\n" + 
        		"  `hcv_ab_code` varchar(1) NULL COMMENT 'HCV_Ab检查结果代码',\r\n" + 
        		"  `hcv_ab_name` varchar(10) NULL COMMENT 'HCV_Ab检查结果',\r\n" + 
        		"  `hiv_ab_code` varchar(1) NULL COMMENT 'HIV_Ab检查结果代码',\r\n" + 
        		"  `hiv_ab_name` varchar(10) NULL COMMENT 'HIV_Ab检查结果',\r\n" + 
        		"  `clinic2out_code` varchar(1) NULL COMMENT '门诊与出院诊断对比符合情况代码',\r\n" + 
        		"  `clinic2out_name` varchar(10) NULL COMMENT '门诊与出院诊断对比符合情况',\r\n" + 
        		"  `in2out_code` varchar(1) NULL COMMENT '入院与出院诊断对比符合情况代码',\r\n" + 
        		"  `in2out_name` varchar(10) NULL COMMENT '入院与出院诊断对比符合情况',\r\n" + 
        		"  `pre_oper2oper_code` varchar(1) NULL COMMENT '术前与术后诊断对比符合情况代码',\r\n" + 
        		"  `pre_oper2oper_name` varchar(10) NULL COMMENT '术前与术后诊断对比符合情况',\r\n" + 
        		"  `radiation2oper_code` varchar(1) NULL COMMENT '放射与术后诊断对比符合情况代码',\r\n" + 
        		"  `radiation2oper_name` varchar(10) NULL COMMENT '放射与术后诊断对比符合情况',\r\n" + 
        		"  `clinic2pathology_code` varchar(1) NULL COMMENT '临床与病理诊断对比符合情况代码',\r\n" + 
        		"  `clinic2pathology_name` varchar(10) NULL COMMENT '临床与病理诊断对比符合情况',\r\n" + 
        		"  `radiation2pathology_code` varchar(1) NULL COMMENT '放射与病理诊断对比符合情况代码',\r\n" + 
        		"  `radiation2pathology_name` varchar(10) NULL COMMENT '放射与病理诊断对比符合情况',\r\n" + 
        		"  `clinic2autopsy_code` varchar(1) NULL COMMENT '临床与尸检诊断对比符合情况代码',\r\n" + 
        		"  `clinic2autopsy_name` varchar(10) NULL COMMENT '临床与尸检诊断对比符合情况',\r\n" + 
        		"  `save_times` int NULL COMMENT '抢救次数',\r\n" + 
        		"  `save_success_times` int NULL COMMENT '抢救成功次数',\r\n" + 
        		"  `diag_basis_code` varchar(2) NULL COMMENT '最高诊断依据代码',\r\n" + 
        		"  `diag_basis_name` varchar(30) NULL COMMENT '最高诊断依据',\r\n" + 
        		"  `differ_level_code` varchar(1) NULL COMMENT '分化程度代码',\r\n" + 
        		"  `differ_level_name` varchar(20) NULL COMMENT '分化程度',\r\n" + 
        		"  `graduate_intern_doctor_id` varchar(30) NULL COMMENT '研究生实习医师：编号',\r\n" + 
        		"  `graduate_intern_doctor_name` varchar(40) NULL COMMENT '研究生实习医师：姓名',\r\n" + 
        		"  `protect_special` int NULL COMMENT '特级护理天数',\r\n" + 
        		"  `protect_i` int NULL COMMENT '一级护理天数',\r\n" + 
        		"  `protect_ii` int NULL COMMENT '二级护理天数',\r\n" + 
        		"  `protect_iii` int NULL COMMENT '三级护理天数',\r\n" + 
        		"  `intensive_care_therapy` varchar(512) NULL COMMENT '重症监护',\r\n" + 
        		"  `intensive_care_room` varchar(512) NULL COMMENT '重症监护室名称',\r\n" + 
        		"  `intensive_care_in_time` varchar(512) NULL COMMENT '进入重症监护室时间',\r\n" + 
        		"  `intensive_care_out_time` varchar(512) NULL COMMENT '转出重症监护室时间',\r\n" + 
        		"  `oper_patient_type_code` varchar(1) NULL COMMENT '手术患者类型代码',\r\n" + 
        		"  `oper_patient_type_name` varchar(10) NULL COMMENT '手术患者类型',\r\n" + 
        		"  `follow_up_weeks` int NULL COMMENT '随诊周数',\r\n" + 
        		"  `follow_up_months` int NULL COMMENT '随诊月数',\r\n" + 
        		"  `follow_up_years` int NULL COMMENT '随诊年数',\r\n" + 
        		"  `teaching_example_mark` varchar(1) NULL COMMENT '住院患者示教病例标志',\r\n" + 
        		"  `transfusion_reaction_mark` varchar(1) NULL COMMENT '住院患者输血反应标志',\r\n" + 
        		"  `transfusion_reaction_mark_name` varchar(10) NULL COMMENT '住院患者输血反应标志名称',\r\n" + 
        		"  `red_blood_cell` decimal(12,2) NULL COMMENT '输红细胞量(单位)',\r\n" + 
        		"  `platelet` decimal(12,2) NULL COMMENT '输血小板量(袋)',\r\n" + 
        		"  `plasma` decimal(12,2) NULL COMMENT '输血浆量(ml)',\r\n" + 
        		"  `whole_blood` decimal(12,2) NULL COMMENT '输全血量(ml)',\r\n" + 
        		"  `self_blood` decimal(12,2) NULL COMMENT '自身回收(ml)',\r\n" + 
        		"  `other_blood` decimal(12,2) NULL COMMENT '输其它血制品量(ml)',\r\n" + 
        		"  `follow_mark` varchar(1) NULL COMMENT '住院患者随诊标志',\r\n" + 
        		"  `age_baby` int NULL COMMENT '婴幼儿年龄(天)',\r\n" + 
        		"  `life_support_machine_time` decimal(8,2) NULL COMMENT '呼吸机使用时间(h)',\r\n" + 
        		"  `ref_in_org_name` varchar(30) NULL COMMENT '转入医院名称',\r\n" + 
        		"  `death_dtime` datetime NULL COMMENT '死亡时间',\r\n" + 
        		"  `contact_province` varchar(200) NULL COMMENT '联系人地址-省(自治区、直辖市)',\r\n" + 
        		"  `contact_city` varchar(200) NULL COMMENT '联系人地址-市(地区、州)',\r\n" + 
        		"  `contact_county` varchar(200) NULL COMMENT '联系人地址-县(区)',\r\n" + 
        		"  `contact_village` varchar(200) NULL COMMENT '联系人地址-乡(镇、街道办事处)',\r\n" + 
        		"  `contact_countryside` varchar(200) NULL COMMENT '联系人地址-村(街、路、弄等)',\r\n" + 
        		"  `contact_door` varchar(200) NULL COMMENT '联系人地址-门牌号码',\r\n" + 
        		"  `clinical_pathway_code` varchar(1) NULL COMMENT '实施临床路径标志代码',\r\n" + 
        		"  `clinical_pathway_name` varchar(10) NULL COMMENT '实施临床路径标志',\r\n" + 
        		"  `ice2paraffin_code` varchar(1) NULL COMMENT '冰冻与石蜡切片病理诊断相符合情况代码',\r\n" + 
        		"  `ice2paraffin_name` varchar(10) NULL COMMENT '冰冻与石蜡切片病理诊断相符合情况',\r\n" + 
        		"  `ice2paraffin_sample_size` smallint NULL COMMENT '冰冻与石蜡切片病理诊断送检样本数',\r\n" + 
        		"  `pay_type` varchar(2) NULL COMMENT '医保付费方式代码',\r\n" + 
        		"  `pay_type_name` varchar(20) NULL COMMENT '医保付费方式',\r\n" + 
        		"  `b_weight_2` int NULL COMMENT '新生儿②出生体重',\r\n" + 
        		"  `b_weight_3` int NULL COMMENT '新生儿③出生体重',\r\n" + 
        		"  `b_weight_4` int NULL COMMENT '新生儿④出生体重',\r\n" + 
        		"  `b_weight_5` int NULL COMMENT '新生儿⑤出生体重',\r\n" + 
        		"  `con_pat_name` varchar(16) NULL COMMENT '与病人关系名称',\r\n" + 
        		"  `schead_idcard` varchar(18) NULL COMMENT '科主任身份证号',\r\n" + 
        		"  `cphy_idcard` varchar(18) NULL COMMENT '主任（副主任）医师身份证号',\r\n" + 
        		"  `rsphy_idcard` varchar(18) NULL COMMENT '主治医师身份证号码',\r\n" + 
        		"  `hphy_idcard` varchar(18) NULL COMMENT '住院医师身份证号',\r\n" + 
        		"  `nurse_idcard` varchar(18) NULL COMMENT '责任护士身份证号',\r\n" + 
        		"  `coder_idcard` varchar(18) NULL COMMENT '编码员身份证号',\r\n" + 
        		"  `quctrdoc_idcard` varchar(18) NULL COMMENT '质控医师身份证号',\r\n" + 
        		"  `quctrnurse_idcard` varchar(18) NULL COMMENT '质控护士身份证号',\r\n" + 
        		"  `act_pay` decimal(12,4) NULL COMMENT '实际支付费用',\r\n" + 
        		"  `mon_grug_cost` decimal(12,4) NULL COMMENT '重点监测药费',\r\n" + 
        		"  `if_cri_case` varchar(1) NULL COMMENT '是否危重病例',\r\n" + 
        		"  `if_dif_case` varchar(1) NULL COMMENT '是否疑难病例',\r\n" + 
        		"  `if_inf_case` varchar(1) NULL COMMENT '是否传染病或疑似病例',\r\n" + 
        		"  `if_un_pneu` varchar(1) NULL COMMENT '是否不明原因肺炎病例',\r\n" + 
        		"  `if_mdt_case` varchar(1) NULL COMMENT '是否MDT病历',\r\n" + 
        		"  `if_sd_case` varchar(1) NULL COMMENT '是否单病种病例',\r\n" + 
        		"  `if_do_case` varchar(1) NULL COMMENT '是否为日间手术病例代码',\r\n" + 
        		"  `if_teach_mr` varchar(1) NULL COMMENT '是否教学查房病历',\r\n" + 
        		"  `ophpdiag_ci` varchar(1) NULL COMMENT '门诊与出院诊断符合标识',\r\n" + 
        		"  `ophpdiag_ci_name` varchar(10) NULL COMMENT '门诊与出院诊断符合名称',\r\n" + 
        		"  `addiag_ci` varchar(1) NULL COMMENT '入院与出院诊断符合标识',\r\n" + 
        		"  `addiag_ci_name` varchar(10) NULL COMMENT '入院与出院诊断符合名称',\r\n" + 
        		"  `operdiag_ci` varchar(1) NULL COMMENT '术前与术后诊断符合标识代码',\r\n" + 
        		"  `operdiag_ci_name` varchar(10) NULL COMMENT '术前与术后诊断符合标识名称',\r\n" + 
        		"  `ccasediag_ci` varchar(1) NULL COMMENT '临床与病理诊断符合标识',\r\n" + 
        		"  `ccasediag_ci_name` varchar(10) NULL COMMENT '临床与病理诊断符合标识名称',\r\n" + 
        		"  `rcasediag_ci` varchar(1) NULL COMMENT '放射与病理诊断符合标识',\r\n" + 
        		"  `rcasediag_ci_name` varchar(10) NULL COMMENT '放射与病理诊断符合标识名称',\r\n" + 
        		"  `cpw_mana_code` varchar(1) NULL COMMENT '临床路径管理代码',\r\n" + 
        		"  `cpw_mana_name` varchar(10) NULL COMMENT '临床路径管理名称',\r\n" + 
        		"  `rec_idcard` varchar(18) NULL COMMENT '记录人身份证号',\r\n" + 
        		"  `rec_man` varchar(40) NULL COMMENT '记录人姓名',\r\n" + 
        		"  `rcd_dt` datetime NULL COMMENT '记录日期时间',\r\n" + 
        		"  `pof_dt` datetime NULL COMMENT '归档日期时间',\r\n" + 
        		"  `reversion_code` varchar(1) NULL COMMENT '病情转归代码',\r\n" + 
        		"  `reversion_name` varchar(10) NULL COMMENT '病情转归名称',\r\n" + 
        		"  `pathology_code` varchar(20) NULL COMMENT '病理诊断疾病编码',\r\n" + 
        		"  `pathology_name` varchar(200) NULL COMMENT '病理诊断疾病名称',\r\n" + 
        		"  `birth_weight1` smallint NULL COMMENT '新生儿出生体重 1',\r\n" + 
        		"  `birth_weight2` smallint NULL COMMENT '新生儿出生体重 2',\r\n" + 
        		"  `state` int NULL COMMENT '状态',\r\n" + 
        		"  `deleted` boolean NULL COMMENT '删除标识',\r\n" + 
        		"  `create_by` bigint NULL COMMENT '创建人',\r\n" + 
        		"  `create_time` datetime NULL COMMENT '创建时间',\r\n" + 
        		"  `update_by` bigint NULL COMMENT '修改人',\r\n" + 
        		"  `update_time` datetime  NOT NULL COMMENT '修改时间',\r\n" + 
        		"  `business_time` datetime  NOT NULL COMMENT '业务时间'\r\n" + 
        		") ENGINE=OLAP \r\n" + 
        		"UNIQUE KEY(`id`) \r\n" + 
        		"COMMENT '住院病案首页' \r\n" + 
        		"DISTRIBUTED BY HASH(`id`) BUCKETS 10 \r\n" + 
        		"PROPERTIES ( \r\n" + 
        		"\"replication_allocation\" = \"tag.location.default: 1\", \r\n" + 
        		"\"is_being_synced\" = \"false\", \r\n" + 
        		"\"storage_format\" = \"V2\", \r\n" + 
        		"\"light_schema_change\" = \"true\", \r\n" + 
        		"\"disable_auto_compaction\" = \"false\", \r\n" + 
        		"\"enable_single_replica_compaction\" = \"false\");\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"CREATE TABLE IF NOT EXISTS `ygt_db`.`eds_tcm_medical_record` (\r\n" + 
        		"  `id` bigint  NOT NULL COMMENT 'ID',\r\n" + 
        		"  `org_id` bigint NULL COMMENT '机构标识',\r\n" + 
        		"  `org_code` varchar(50)  NOT NULL COMMENT '机构编码',\r\n" + 
        		"  `org_name` varchar(50)  NOT NULL COMMENT '机构名称',\r\n" + 
        		"  `id_type_code` varchar(2)  NOT NULL COMMENT '身份证件类别代码',\r\n" + 
        		"  `id_type_name` varchar(20)  NOT NULL COMMENT '身份证件类别名称',\r\n" + 
        		"  `id_no` varchar(128)  NOT NULL COMMENT '身份证件号码',\r\n" + 
        		"  `pay_way_code` varchar(2)  NOT NULL COMMENT '医疗付费方式代码',\r\n" + 
        		"  `pay_way_name` varchar(20) NULL COMMENT '医疗付款方式名称',\r\n" + 
        		"  `card_no` varchar(36)  NOT NULL COMMENT '居民健康卡号',\r\n" + 
        		"  `patient_id` varchar(128)  NOT NULL COMMENT '病人ID',\r\n" + 
        		"  `case_no` varchar(128)  NOT NULL COMMENT '病案号',\r\n" + 
        		"  `in_hospital_times` varchar(128)  NOT NULL COMMENT '住院次数',\r\n" + 
        		"  `inpat_form_no` varchar(128)  NOT NULL COMMENT '住院记录表编号',\r\n" + 
        		"  `report_form_no` varchar(128)  NOT NULL COMMENT '病案首页报告单号',\r\n" + 
        		"  `name` varchar(128)  NOT NULL COMMENT '姓名',\r\n" + 
        		"  `sex_code` varchar(1)  NOT NULL COMMENT '性别代码',\r\n" + 
        		"  `gender` varchar(10)  NOT NULL COMMENT '患者性别',\r\n" + 
        		"  `birth_date` datetime  NOT NULL COMMENT '出生日期',\r\n" + 
        		"  `age_year` smallint  NOT NULL COMMENT '年龄(岁)',\r\n" + 
        		"  `age_month` varchar(8)  NOT NULL COMMENT '年龄(月)',\r\n" + 
        		"  `age_day` smallint  NOT NULL COMMENT '天数（天）',\r\n" + 
        		"  `age_unit_code` varchar(1) NULL COMMENT '年龄单位代码',\r\n" + 
        		"  `age_unit_name` varchar(20) NULL COMMENT '年龄单位名称',\r\n" + 
        		"  `country_code` varchar(3)  NOT NULL COMMENT '国籍代码',\r\n" + 
        		"  `country_name` varchar(20) NULL COMMENT '国籍名称',\r\n" + 
        		"  `birth_weight` smallint  NOT NULL COMMENT '新生儿出生体重(g)',\r\n" + 
        		"  `in_weight` smallint  NOT NULL COMMENT '新生儿入院体重(g)',\r\n" + 
        		"  `birth_addr_province` varchar(200)  NOT NULL COMMENT '出生地-省(自治区、直辖市)',\r\n" + 
        		"  `birth_addr_city` varchar(70)  NOT NULL COMMENT '出生地-市(地区、州)',\r\n" + 
        		"  `birth_addr_county` varchar(70)  NOT NULL COMMENT '出生地-县(区)',\r\n" + 
        		"  `native_province` varchar(200)  NOT NULL COMMENT '籍贯-省(自治区、直辖市)',\r\n" + 
        		"  `native_city` varchar(70)  NOT NULL COMMENT '籍贯-市(地区、州)',\r\n" + 
        		"  `nationality_code` varchar(2)  NOT NULL COMMENT '民族代码',\r\n" + 
        		"  `nationality_name` varchar(10)  NOT NULL COMMENT '民族名称',\r\n" + 
        		"  `occupation_code` varchar(10)  NOT NULL COMMENT '职业类别代码',\r\n" + 
        		"  `occupation_name` varchar(50)  NOT NULL COMMENT '职业类别代码名称',\r\n" + 
        		"  `marriage_code` varchar(2)  NOT NULL COMMENT '婚姻状况代码',\r\n" + 
        		"  `marriage_name` varchar(10)  NOT NULL COMMENT '婚姻状况',\r\n" + 
        		"  `addr_province` varchar(200)  NOT NULL COMMENT '地址-省(自治区、直辖市)',\r\n" + 
        		"  `addr_city` varchar(200)  NOT NULL COMMENT '地址-市(地区、州)',\r\n" + 
        		"  `addr_county` varchar(200)  NOT NULL COMMENT '地址-县(区)',\r\n" + 
        		"  `addr_town` varchar(200)  NOT NULL COMMENT '地址-乡(镇、街道办事处)',\r\n" + 
        		"  `addr_village` varchar(200)  NOT NULL COMMENT '地址-村(街、路、弄等)',\r\n" + 
        		"  `addr_house_no` varchar(200)  NOT NULL COMMENT '地址-门牌号码',\r\n" + 
        		"  `tel_no` varchar(128)  NOT NULL COMMENT '电话号码',\r\n" + 
        		"  `present_addr_postal_code` varchar(20)  NOT NULL COMMENT '住址-邮政编码',\r\n" + 
        		"  `register_addr_province` varchar(70)  NOT NULL COMMENT '户口地址-省(自治区、直辖市',\r\n" + 
        		"  `register_addr_city` varchar(70)  NOT NULL COMMENT '户口地址-市(地区、州)',\r\n" + 
        		"  `register_addr_county` varchar(70)  NOT NULL COMMENT '户口地址-县(区)',\r\n" + 
        		"  `register_addr_town` varchar(70)  NOT NULL COMMENT '户口地址-乡(镇、街道办事处)',\r\n" + 
        		"  `register_addr_village` varchar(70)  NOT NULL COMMENT '户口地址-村(街、路、弄等)',\r\n" + 
        		"  `register_addr_house_no` varchar(200)  NOT NULL COMMENT '户口地址-门牌号码',\r\n" + 
        		"  `register_addr_postal_code` varchar(200)  NOT NULL COMMENT '户口地址-邮政编码',\r\n" + 
        		"  `employer_name` varchar(70)  NOT NULL COMMENT '工作单位名称',\r\n" + 
        		"  `employer_addr_province` varchar(200)  NOT NULL COMMENT '工作单位地址-省(自治区、直辖市)',\r\n" + 
        		"  `employer_addr_city` varchar(200)  NOT NULL COMMENT '工作单位地址-市(地区、州)',\r\n" + 
        		"  `employer_addr_county` varchar(200)  NOT NULL COMMENT '工作单位地址-县(区)',\r\n" + 
        		"  `employer_addr_town` varchar(200)  NOT NULL COMMENT '工作单位地址-乡(镇、街道办事处)',\r\n" + 
        		"  `employer_addr_village` varchar(70)  NOT NULL COMMENT '工作单位地址-村(街、路、弄等)',\r\n" + 
        		"  `employer_addr_house_no` varchar(200)  NOT NULL COMMENT '工作单位地址-门牌号码',\r\n" + 
        		"  `employer_tel_no` varchar(128)  NOT NULL COMMENT '工作单位电话号码',\r\n" + 
        		"  `employer_postal_code` varchar(20)  NOT NULL COMMENT '工作单位地址-邮政编码',\r\n" + 
        		"  `contact_name` varchar(50)  NOT NULL COMMENT '联系人姓名',\r\n" + 
        		"  `contact_relationship_cd` varchar(2)  NOT NULL COMMENT '联系人与患者的关系代码',\r\n" + 
        		"  `contact_relationship_name` varchar(20)  NOT NULL COMMENT '联系人-关系名称',\r\n" + 
        		"  `contact_province` varchar(200)  NOT NULL COMMENT '联系人地址-省(自治区、直辖市)',\r\n" + 
        		"  `contact_city` varchar(200)  NOT NULL COMMENT '联系人地址-市(地区、州)',\r\n" + 
        		"  `contact_county` varchar(200)  NOT NULL COMMENT '联系人地址-县(区)',\r\n" + 
        		"  `contact_village` varchar(200)  NOT NULL COMMENT '联系人地址-乡(镇、街道办事处)',\r\n" + 
        		"  `contact_countryside` varchar(200)  NOT NULL COMMENT '联系人地址-村(街、路、弄等)',\r\n" + 
        		"  `contact_door` varchar(200)  NOT NULL COMMENT '联系人地址-门牌号码',\r\n" + 
        		"  `contact_tel` varchar(200)  NOT NULL COMMENT '联系人电话号码',\r\n" + 
        		"  `in_path_code` varchar(2)  NOT NULL COMMENT '入院途径代码',\r\n" + 
        		"  `in_path_name` varchar(10)  NOT NULL COMMENT '入院途径名称',\r\n" + 
        		"  `inpat_type_code` varchar(2)  NOT NULL COMMENT '治疗类别代码',\r\n" + 
        		"  `inpat_type_name` varchar(10)  NOT NULL COMMENT '治疗类别名称',\r\n" + 
        		"  `in_dtime` datetime  NOT NULL COMMENT '入院日期时间',\r\n" + 
        		"  `in_dept_code` varchar(9)  NOT NULL COMMENT '入院科室编码',\r\n" + 
        		"  `in_dept_name` varchar(40)  NOT NULL COMMENT '入院科室名称',\r\n" + 
        		"  `in_dept_room` varchar(10)  NOT NULL COMMENT '入院病房',\r\n" + 
        		"  `move_dept_code` varchar(9)  NOT NULL COMMENT '转科科室代码',\r\n" + 
        		"  `move_dept_name` varchar(40)  NOT NULL COMMENT '转科科室名称',\r\n" + 
        		"  `discharge_dtime` datetime  NOT NULL COMMENT '出院日期时间',\r\n" + 
        		"  `out_dept_code` varchar(9)  NOT NULL COMMENT '出院科室代码',\r\n" + 
        		"  `out_dept_name` varchar(40)  NOT NULL COMMENT '出院科室名称',\r\n" + 
        		"  `out_dept_room` varchar(10)  NOT NULL COMMENT '出院病房',\r\n" + 
        		"  `actual_in_days` int  NOT NULL COMMENT '实际住院天数',\r\n" + 
        		"  `clinical_pathway_code` varchar(1)  NOT NULL COMMENT '实施临床路径标志代码',\r\n" + 
        		"  `clinical_pathway_name` varchar(10)  NOT NULL COMMENT '实施临床路径标志',\r\n" + 
        		"  `tcm_medical_org_flag` varchar(1)  NOT NULL COMMENT '使用医疗机构中药制剂标志',\r\n" + 
        		"  `tcm_diag_treat_device_flag` varchar(1)  NOT NULL COMMENT '使用中医诊疗设备标志',\r\n" + 
        		"  `tcm_diag_treat_tech_flag` varchar(1)  NOT NULL COMMENT '使用中医诊疗技术标志',\r\n" + 
        		"  `syndrome_nursing_flag` varchar(1)  NOT NULL COMMENT '辨证施护标志',\r\n" + 
        		"  `damage_poison_reason` varchar(200)  NOT NULL COMMENT '损伤中毒的外部原因',\r\n" + 
        		"  `damage_poison_icd_cd` varchar(24)  NOT NULL COMMENT '损伤中毒的外部原因疾病编码',\r\n" + 
        		"  `damage_poison_icd_name` varchar(50)  NOT NULL COMMENT '损伤中毒的外部原因疾病名称',\r\n" + 
        		"  `pathological_no` varchar(128)  NOT NULL COMMENT '病理号',\r\n" + 
        		"  `drug_allergy_mark` varchar(1)  NOT NULL COMMENT '药物过敏标志',\r\n" + 
        		"  `drug_allergens_name` varchar(200)  NOT NULL COMMENT '过敏药物',\r\n" + 
        		"  `autopsy_mark` varchar(1)  NOT NULL COMMENT '死亡患者尸检标志',\r\n" + 
        		"  `abo_code` varchar(1)  NOT NULL COMMENT 'ABO血型代码',\r\n" + 
        		"  `abo_name` varchar(10)  NOT NULL COMMENT 'ABO血型名称',\r\n" + 
        		"  `rh_code` varchar(1)  NOT NULL COMMENT 'Rh血型代码',\r\n" + 
        		"  `rh_name` varchar(10)  NOT NULL COMMENT 'Rh血型名称',\r\n" + 
        		"  `dept_director_id` varchar(30)  NOT NULL COMMENT '科主任：编号',\r\n" + 
        		"  `dept_director_name` varchar(40)  NOT NULL COMMENT '科主任签名',\r\n" + 
        		"  `chief_doctor_id` varchar(30)  NOT NULL COMMENT '主任(副主任)医师：编号',\r\n" + 
        		"  `chief_doctor_name` varchar(40)  NOT NULL COMMENT '主任(副主任)医师签名',\r\n" + 
        		"  `in_charge_doctor_id` varchar(30)  NOT NULL COMMENT '主治医师：编号',\r\n" + 
        		"  `in_charge_doctor_name` varchar(40)  NOT NULL COMMENT '主治医师签名',\r\n" + 
        		"  `resident_doctor_id` varchar(30)  NOT NULL COMMENT '住院医师：编号',\r\n" + 
        		"  `resident_doctor_name` varchar(40)  NOT NULL COMMENT '住院医师签名',\r\n" + 
        		"  `resp_nurse_id` varchar(30)  NOT NULL COMMENT '责任护士：编号',\r\n" + 
        		"  `resp_nurse_name` varchar(40)  NOT NULL COMMENT '责任护士签名',\r\n" + 
        		"  `learning_doctor_id` varchar(30)  NOT NULL COMMENT '进修医师：编号',\r\n" + 
        		"  `learning_doctor_name` varchar(40)  NOT NULL COMMENT '进修医师签名',\r\n" + 
        		"  `intern_doctor_id` varchar(30)  NOT NULL COMMENT '实习医师：编号',\r\n" + 
        		"  `intern_doctor_name` varchar(40)  NOT NULL COMMENT '实习医师签名',\r\n" + 
        		"  `cataloger_id` varchar(30)  NOT NULL COMMENT '编码员：编号',\r\n" + 
        		"  `cataloger_name` varchar(40)  NOT NULL COMMENT '编码员签名',\r\n" + 
        		"  `case_quality_cd` varchar(1)  NOT NULL COMMENT '病案质量代码',\r\n" + 
        		"  `case_quality_name` varchar(20)  NOT NULL COMMENT '病案质量名称',\r\n" + 
        		"  `qc_doctor_id` varchar(30)  NOT NULL COMMENT '质控医师：编号',\r\n" + 
        		"  `qc_doctor_name` varchar(40)  NOT NULL COMMENT '质控医师签名',\r\n" + 
        		"  `qc_nurse_id` varchar(30)  NOT NULL COMMENT '质控护士：编号',\r\n" + 
        		"  `qc_nurse_name` varchar(40)  NOT NULL COMMENT '质控护士签名',\r\n" + 
        		"  `qc_dtime` datetime  NOT NULL COMMENT '质控日期',\r\n" + 
        		"  `discharge_class_cd` varchar(2)  NOT NULL COMMENT '离院方式代码',\r\n" + 
        		"  `discharge_class_name` varchar(30)  NOT NULL COMMENT '离院方式名称',\r\n" + 
        		"  `order_referral_org` varchar(70)  NOT NULL COMMENT '拟接收医疗机构名称',\r\n" + 
        		"  `rehosp_after31_mark` varchar(1)  NOT NULL COMMENT '出院31d内再住院标志',\r\n" + 
        		"  `rehosp_after31_purpose` varchar(100)  NOT NULL COMMENT '出院31d内再住院目的',\r\n" + 
        		"  `crani_befin_coma_days` int  NOT NULL COMMENT '颅脑损伤患者入院前昏迷时间-d',\r\n" + 
        		"  `crani_befin_coma_hours` int  NOT NULL COMMENT '颅脑损伤患者入院前昏迷时间-h',\r\n" + 
        		"  `crani_befin_coma_minutes` int  NOT NULL COMMENT '颅脑损伤患者入院前昏迷时间-min',\r\n" + 
        		"  `crani_behin_coma_days` int  NOT NULL COMMENT '颅脑损伤患者入院后昏迷时间-d',\r\n" + 
        		"  `crani_behin_coma_hours` int  NOT NULL COMMENT '颅脑损伤患者入院后昏迷时间-h',\r\n" + 
        		"  `crani_behin_coma_minutes` int  NOT NULL COMMENT '颅脑损伤患者入院后昏迷时间-min',\r\n" + 
        		"  `fee_total` decimal(12,4)  NOT NULL COMMENT '住院总费用',\r\n" + 
        		"  `fee_self_pay` decimal(12,4)  NOT NULL COMMENT '住院总费用-自付金额',\r\n" + 
        		"  `fee_general_medical` decimal(12,4)  NOT NULL COMMENT '综合医疗服务类-一般医疗服务费',\r\n" + 
        		"  `fee_general_tcm_treatment` decimal(12,4)  NOT NULL COMMENT '综合医疗服务类-一般医疗服务费-中医辨证论治费',\r\n" + 
        		"  `fee_general_tcm_consult` decimal(12,4)  NOT NULL COMMENT '综合医疗服务类-一般医疗服务费-中医辨证论治会诊费',\r\n" + 
        		"  `fee_general_treatment` decimal(12,4)  NOT NULL COMMENT '综合医疗服务类-一般治疗操作费',\r\n" + 
        		"  `fee_nursing` decimal(12,4)  NOT NULL COMMENT '综合医疗服务类-护理费',\r\n" + 
        		"  `fee_other_medical` decimal(12,4)  NOT NULL COMMENT '综合医疗服务类-其他费用',\r\n" + 
        		"  `fee_pathology` decimal(12,4)  NOT NULL COMMENT '诊断类-病理诊断费',\r\n" + 
        		"  `fee_laboratory` decimal(12,4)  NOT NULL COMMENT '诊断类-实验室诊断费',\r\n" + 
        		"  `fee_image` decimal(12,4)  NOT NULL COMMENT '诊断类-影像学诊断费',\r\n" + 
        		"  `fee_clinic` decimal(12,4)  NOT NULL COMMENT '诊断类-临床诊断项目费',\r\n" + 
        		"  `fee_nonsurgical` decimal(12,4)  NOT NULL COMMENT '治疗类-非手术治疗项目费',\r\n" + 
        		"  `fee_nonsurgical_phys` decimal(12,4)  NOT NULL COMMENT '治疗类-非手术治疗项目费-临床物理治疗费',\r\n" + 
        		"  `fee_surgical` decimal(12,4)  NOT NULL COMMENT '治疗类-手术治疗费',\r\n" + 
        		"  `fee_anes` decimal(12,4)  NOT NULL COMMENT '治疗类-手术治疗费-麻醉费',\r\n" + 
        		"  `fee_operation` decimal(12,4)  NOT NULL COMMENT '治疗类-手术治疗费-手术费',\r\n" + 
        		"  `fee_recovery` decimal(12,4)  NOT NULL COMMENT '康复类-康复费',\r\n" + 
        		"  `fee_tcm_diag` decimal(12,4)  NOT NULL COMMENT '中医类-中医诊断费',\r\n" + 
        		"  `fee_tcm_treatment` decimal(12,4)  NOT NULL COMMENT '中医类-中医治疗费',\r\n" + 
        		"  `fee_tcm_foreign_rule` decimal(12,4)  NOT NULL COMMENT '中医类-中医治疗费-中医外治费',\r\n" + 
        		"  `fee_tcm_orthopedics` decimal(12,4)  NOT NULL COMMENT '中医类-中医治疗费-中医骨伤费',\r\n" + 
        		"  `fee_tcm_acu_moxi` decimal(12,4)  NOT NULL COMMENT '中医类-中医治疗费-针刺与灸法费',\r\n" + 
        		"  `fee_tcm_massage` decimal(12,4)  NOT NULL COMMENT '中医类-中医治疗费-中医推拿治疗费',\r\n" + 
        		"  `fee_tcm_anorectal` decimal(12,4)  NOT NULL COMMENT '中医类-中医治疗费-中医肛肠治疗费',\r\n" + 
        		"  `fee_tcm_special` decimal(12,4)  NOT NULL COMMENT '中医类-中医治疗费-中医特殊治疗费',\r\n" + 
        		"  `fee_tcm_other` decimal(12,4)  NOT NULL COMMENT '中医类-中医其他费',\r\n" + 
        		"  `fee_tcm_special_mix` decimal(12,4)  NOT NULL COMMENT '中医类-中医其他费-中医特殊调配加工费',\r\n" + 
        		"  `fee_tcm_drug_food` decimal(12,4)  NOT NULL COMMENT '中医类-中医其他费-辨证施膳费',\r\n" + 
        		"  `fee_west_medicine` decimal(12,4)  NOT NULL COMMENT '西药类-西药费',\r\n" + 
        		"  `fee_west_anti` decimal(12,4)  NOT NULL COMMENT '西药类-西药费-抗菌药物费用',\r\n" + 
        		"  `fee_tcm_medicine` decimal(12,4)  NOT NULL COMMENT '中药类-中成药费',\r\n" + 
        		"  `fee_tcm_org_medicine` decimal(12,4)  NOT NULL COMMENT '中药类-中成药费-医疗机构中药制剂费',\r\n" + 
        		"  `fee_tcm_herbal_medicine` decimal(12,4)  NOT NULL COMMENT '中药类-中草药费',\r\n" + 
        		"  `fee_blood` decimal(12,4)  NOT NULL COMMENT '血液和血液制品类-血费',\r\n" + 
        		"  `fee_albumin` decimal(12,4)  NOT NULL COMMENT '血液和血液制品类-白蛋白类制品费',\r\n" + 
        		"  `fee_globulin` decimal(12,4)  NOT NULL COMMENT '血液和血液制品类-球蛋白类制品费',\r\n" + 
        		"  `fee_bcf` decimal(12,4)  NOT NULL COMMENT '血液和血液制品类-凝血因子类制品费',\r\n" + 
        		"  `fee_cytokine` decimal(12,4)  NOT NULL COMMENT '血液和血液制品类-细胞因子类制品费',\r\n" + 
        		"  `fee_exam_material` decimal(12,4)  NOT NULL COMMENT '耗材类-检查用一次性医用材料费',\r\n" + 
        		"  `fee_treat_material` decimal(12,4)  NOT NULL COMMENT '耗材类-治疗用一次性医用材料费',\r\n" + 
        		"  `fee_op_material` decimal(12,4)  NOT NULL COMMENT '耗材类-手术用一次性医用材料费',\r\n" + 
        		"  `fee_other` decimal(12,4)  NOT NULL COMMENT '其他类-其他费',\r\n" + 
        		"  `notes` varchar(4000)  NOT NULL COMMENT '备注',\r\n" + 
        		"  `ice2paraffin_code` varchar(1) NULL COMMENT '冰冻与石蜡切片病理诊断相符合情况代码',\r\n" + 
        		"  `ice2paraffin_name` varchar(10) NULL COMMENT '冰冻与石蜡切片病理诊断相符合情况',\r\n" + 
        		"  `ice2paraffin_sample_size` smallint NULL COMMENT '冰冻与石蜡切片病理诊断送检样本数',\r\n" + 
        		"  `pay_type` varchar(2) NULL COMMENT '医保付费方式代码',\r\n" + 
        		"  `pay_type_name` varchar(20) NULL COMMENT '医保付费方式',\r\n" + 
        		"  `b_weight_2` int NULL COMMENT '新生儿②出生体重',\r\n" + 
        		"  `b_weight_3` int NULL COMMENT '新生儿③出生体重',\r\n" + 
        		"  `b_weight_4` int NULL COMMENT '新生儿④出生体重',\r\n" + 
        		"  `b_weight_5` int NULL COMMENT '新生儿⑤出生体重',\r\n" + 
        		"  `con_pat_name` varchar(16) NULL COMMENT '与病人关系名称',\r\n" + 
        		"  `cpw_mana_code` varchar(1) NULL COMMENT '临床路径管理代码',\r\n" + 
        		"  `cpw_mana_name` varchar(10) NULL COMMENT '临床路径管理名称',\r\n" + 
        		"  `bl_tr_recat` varchar(1) NULL COMMENT '输血反应',\r\n" + 
        		"  `bl_tr_recat_name` varchar(10) NULL COMMENT '输血反应名称',\r\n" + 
        		"  `schead_idcard` varchar(18) NULL COMMENT '科主任身份证号',\r\n" + 
        		"  `cphy_idcard` varchar(18) NULL COMMENT '主任（副主任）医师身份证号',\r\n" + 
        		"  `rsphy_idcard` varchar(18) NULL COMMENT '主治医师身份证号码',\r\n" + 
        		"  `hphy_idcard` varchar(18) NULL COMMENT '住院医师身份证号',\r\n" + 
        		"  `nurse_idcard` varchar(18) NULL COMMENT '责任护士身份证号',\r\n" + 
        		"  `coder_idcard` varchar(18) NULL COMMENT '编码员身份证号',\r\n" + 
        		"  `quctrdoc_idcard` varchar(18) NULL COMMENT '质控医师身份证号',\r\n" + 
        		"  `quctrnurse_idcard` varchar(18) NULL COMMENT '质控护士身份证号',\r\n" + 
        		"  `act_pay` decimal(12,4) NULL COMMENT '实际支付费用',\r\n" + 
        		"  `mon_grug_cost` decimal(12,4) NULL COMMENT '重点监测药费',\r\n" + 
        		"  `vent_time` int NULL COMMENT '有创呼吸机使用时间',\r\n" + 
        		"  `if_cri_case` varchar(1) NULL COMMENT '是否危重病例',\r\n" + 
        		"  `if_dif_case` varchar(1) NULL COMMENT '是否疑难病例',\r\n" + 
        		"  `if_inf_case` varchar(1) NULL COMMENT '是否传染病或疑似病例',\r\n" + 
        		"  `if_un_pneu` varchar(1) NULL COMMENT '是否不明原因肺炎病例',\r\n" + 
        		"  `if_mdt_case` varchar(1) NULL COMMENT '是否MDT病历',\r\n" + 
        		"  `if_sd_case` varchar(1) NULL COMMENT '是否单病种病例',\r\n" + 
        		"  `if_do_case` varchar(1) NULL COMMENT '是否为日间手术病例代码',\r\n" + 
        		"  `if_teach_mr` varchar(1) NULL COMMENT '是否教学查房病历',\r\n" + 
        		"  `ophpdiag_ci` varchar(1) NULL COMMENT '门诊与出院诊断符合标识',\r\n" + 
        		"  `ophpdiag_ci_name` varchar(10) NULL COMMENT '门诊与出院诊断符合名称',\r\n" + 
        		"  `addiag_ci` varchar(1) NULL COMMENT '入院与出院诊断符合标识',\r\n" + 
        		"  `addiag_ci_name` varchar(10) NULL COMMENT '入院与出院诊断符合名称',\r\n" + 
        		"  `operdiag_ci` varchar(1) NULL COMMENT '术前与术后诊断符合标识代码',\r\n" + 
        		"  `operdiag_ci_name` varchar(10) NULL COMMENT '术前与术后诊断符合标识名称',\r\n" + 
        		"  `ccasediag_ci` varchar(1) NULL COMMENT '临床与病理诊断符合标识',\r\n" + 
        		"  `ccasediag_ci_name` varchar(10) NULL COMMENT '临床与病理诊断符合标识名称',\r\n" + 
        		"  `rcasediag_ci` varchar(1) NULL COMMENT '放射与病理诊断符合标识',\r\n" + 
        		"  `rcasediag_ci_name` varchar(10) NULL COMMENT '放射与病理诊断符合标识名称',\r\n" + 
        		"  `rsc_no` smallint NULL COMMENT '抢救次数',\r\n" + 
        		"  `sc_rsc_no` smallint NULL COMMENT '抢救成功次数',\r\n" + 
        		"  `rec_idcard` varchar(18) NULL COMMENT '记录人身份证号',\r\n" + 
        		"  `rec_man` varchar(40) NULL COMMENT '记录人姓名',\r\n" + 
        		"  `rcd_dt` datetime NULL COMMENT '记录日期时间',\r\n" + 
        		"  `pof_dt` datetime NULL COMMENT '归档日期时间',\r\n" + 
        		"  `therapeutic_principles` varchar(2000) NULL COMMENT '治则治法',\r\n" + 
        		"  `reversion_code` varchar(1) NULL COMMENT '病情转归代码',\r\n" + 
        		"  `reversion_name` varchar(10) NULL COMMENT '病情转归名称',\r\n" + 
        		"  `pathology_code` varchar(20) NULL COMMENT '病理诊断疾病编码',\r\n" + 
        		"  `pathology_name` varchar(200) NULL COMMENT '病理诊断疾病名称',\r\n" + 
        		"  `state` int NULL COMMENT '状态',\r\n" + 
        		"  `deleted` boolean NULL COMMENT '删除标识',\r\n" + 
        		"  `create_by` bigint NULL COMMENT '创建人',\r\n" + 
        		"  `create_time` datetime NULL COMMENT '创建时间',\r\n" + 
        		"  `update_by` bigint NULL COMMENT '修改人',\r\n" + 
        		"  `update_time` datetime  NOT NULL COMMENT '修改时间',\r\n" + 
        		"  `business_time` datetime  NOT NULL COMMENT '业务时间'\r\n" + 
        		") ENGINE=OLAP \r\n" + 
        		"UNIQUE KEY(`id`) \r\n" + 
        		"COMMENT '中医住院病案首页' \r\n" + 
        		"DISTRIBUTED BY HASH(`id`) BUCKETS 10 \r\n" + 
        		"PROPERTIES ( \r\n" + 
        		"\"replication_allocation\" = \"tag.location.default: 1\", \r\n" + 
        		"\"is_being_synced\" = \"false\", \r\n" + 
        		"\"storage_format\" = \"V2\", \r\n" + 
        		"\"light_schema_change\" = \"true\", \r\n" + 
        		"\"disable_auto_compaction\" = \"false\", \r\n" + 
        		"\"enable_single_replica_compaction\" = \"false\");\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"CREATE TABLE IF NOT EXISTS `ygt_db`.`inpatient_firstoutdiag` (\r\n" + 
        		"  `id` bigint  NOT NULL COMMENT 'ID',\r\n" + 
        		"  `org_id` bigint NULL COMMENT '机构标识',\r\n" + 
        		"  `org_code` varchar(50)  NOT NULL COMMENT '机构编码',\r\n" + 
        		"  `org_name` varchar(50)  NOT NULL COMMENT '机构名称',\r\n" + 
        		"  `card_no` varchar(36) NULL COMMENT '居民健康卡号',\r\n" + 
        		"  `id_type_code` varchar(2)  NOT NULL COMMENT '身份证件类别代码',\r\n" + 
        		"  `id_type_name` varchar(20)  NOT NULL COMMENT '身份证件类别名称',\r\n" + 
        		"  `id_no` varchar(128)  NOT NULL COMMENT '身份证件号码',\r\n" + 
        		"  `case_type` varchar(2)  NOT NULL COMMENT '病案首页类型',\r\n" + 
        		"  `case_type_name` varchar(10)  NOT NULL COMMENT '病案首页类型名称',\r\n" + 
        		"  `inpat_form_no` varchar(128)  NOT NULL COMMENT '住院记录表编号',\r\n" + 
        		"  `report_form_no` varchar(128)  NOT NULL COMMENT '所属报告单号',\r\n" + 
        		"  `diagnosis_id` varchar(128)  NOT NULL COMMENT '诊断序列号',\r\n" + 
        		"  `diagnosis_cd` varchar(24)  NOT NULL COMMENT '诊断编码',\r\n" + 
        		"  `diagnosis_name` varchar(50)  NOT NULL COMMENT '疾病诊断名称',\r\n" + 
        		"  `diagnosis_z_cd` varchar(24) NULL COMMENT '中医证候编码',\r\n" + 
        		"  `diagnosis_z_name` varchar(120) NULL COMMENT '中医证候名称',\r\n" + 
        		"  `in_condition_cd` varchar(2)  NOT NULL COMMENT '入院病情代码',\r\n" + 
        		"  `in_condition_name` varchar(10)  NOT NULL COMMENT '入院病情名称',\r\n" + 
        		"  `last_diagnosis_date` datetime  NOT NULL COMMENT '入院后确诊日期',\r\n" + 
        		"  `diag_result_code` varchar(2)  NOT NULL COMMENT '诊断结果',\r\n" + 
        		"  `diag_result_name` varchar(2)  NOT NULL COMMENT '诊断结果名称',\r\n" + 
        		"  `pathological_no` varchar(128)  NOT NULL COMMENT '病理号',\r\n" + 
        		"  `diag_type_code` varchar(2)  NOT NULL COMMENT '诊断类型代码',\r\n" + 
        		"  `diag_type_code_name` varchar(20)  NOT NULL COMMENT '诊断类型代码名称',\r\n" + 
        		"  `diag_type` varchar(1)  NOT NULL COMMENT '中西医诊断标识',\r\n" + 
        		"  `diag_type_name` varchar(10) NULL COMMENT '中西医诊断标识名称',\r\n" + 
        		"  `org_type_code` varchar(50)  NOT NULL COMMENT '机构类别（大类）代码',\r\n" + 
        		"  `state` int NULL COMMENT '状态',\r\n" + 
        		"  `deleted` boolean NULL COMMENT '删除标识',\r\n" + 
        		"  `create_by` bigint NULL COMMENT '创建人',\r\n" + 
        		"  `create_time` datetime NULL COMMENT '创建时间',\r\n" + 
        		"  `update_by` bigint NULL COMMENT '修改人',\r\n" + 
        		"  `update_time` datetime  NOT NULL COMMENT '修改时间',\r\n" + 
        		"  `business_time` datetime  NOT NULL COMMENT '业务时间'\r\n" + 
        		") ENGINE=OLAP \r\n" + 
        		"UNIQUE KEY(`id`) \r\n" + 
        		"COMMENT '住院病案首页-出院诊断' \r\n" + 
        		"DISTRIBUTED BY HASH(`id`) BUCKETS 10 \r\n" + 
        		"PROPERTIES ( \r\n" + 
        		"\"replication_allocation\" = \"tag.location.default: 1\", \r\n" + 
        		"\"is_being_synced\" = \"false\", \r\n" + 
        		"\"storage_format\" = \"V2\", \r\n" + 
        		"\"light_schema_change\" = \"true\", \r\n" + 
        		"\"disable_auto_compaction\" = \"false\", \r\n" + 
        		"\"enable_single_replica_compaction\" = \"false\");\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"CREATE TABLE IF NOT EXISTS `ygt_db`.`inpatient_firstoper` (\r\n" + 
        		"  `id` bigint  NOT NULL COMMENT 'ID',\r\n" + 
        		"  `org_id` bigint NULL COMMENT '机构标识',\r\n" + 
        		"  `org_code` varchar(50)  NOT NULL COMMENT '机构编码',\r\n" + 
        		"  `org_name` varchar(50)  NOT NULL COMMENT '机构名称',\r\n" + 
        		"  `id_type_code` varchar(2) NULL COMMENT '身份证件类别代码',\r\n" + 
        		"  `id_type_name` varchar(20) NULL COMMENT '身份证件类别名称',\r\n" + 
        		"  `id_no` varchar(128) NULL COMMENT '身份证件号码',\r\n" + 
        		"  `case_type` varchar(2)  NOT NULL COMMENT '病案首页类型',\r\n" + 
        		"  `case_type_name` varchar(10)  NOT NULL COMMENT '病案首页类型名称',\r\n" + 
        		"  `inpat_form_no` varchar(128)  NOT NULL COMMENT '住院记录表编号',\r\n" + 
        		"  `report_form_no` varchar(128)  NOT NULL COMMENT '所属报告单号',\r\n" + 
        		"  `oper_form_no` varchar(128)  NOT NULL COMMENT '手术记录表单号',\r\n" + 
        		"  `operation_code` varchar(128)  NOT NULL COMMENT '手术(操作)编码',\r\n" + 
        		"  `operation_name` varchar(128)  NOT NULL COMMENT '手术及操作名称',\r\n" + 
        		"  `operation_dtime` datetime  NOT NULL COMMENT '手术(操作)日期时间',\r\n" + 
        		"  `operation_end_time` datetime NULL COMMENT '手术结束日期时间',\r\n" + 
        		"  `operation_level_cd` varchar(1)  NOT NULL COMMENT '手术级别代码',\r\n" + 
        		"  `operation_level_name` varchar(10)  NOT NULL COMMENT '手术级别名称',\r\n" + 
        		"  `surgeon_id` varchar(30)  NOT NULL COMMENT '手术操作人员：编号',\r\n" + 
        		"  `surgeon_name` varchar(40)  NOT NULL COMMENT '手术操作人员',\r\n" + 
        		"  `assistant1_id` varchar(30)  NOT NULL COMMENT 'Ⅰ助：编号',\r\n" + 
        		"  `assistant1_name` varchar(40)  NOT NULL COMMENT 'Ⅰ助：姓名',\r\n" + 
        		"  `assistant2_id` varchar(30)  NOT NULL COMMENT 'Ⅱ助：编号',\r\n" + 
        		"  `assistant2_name` varchar(40)  NOT NULL COMMENT 'Ⅱ助：姓名',\r\n" + 
        		"  `third_assistant_id` varchar(30) NULL COMMENT '第三助手',\r\n" + 
        		"  `third_assistant` varchar(40) NULL COMMENT '第三助手姓名',\r\n" + 
        		"  `incision_type_code` varchar(1)  NOT NULL COMMENT '手术切口类别代码',\r\n" + 
        		"  `incision_type_name` varchar(10)  NOT NULL COMMENT '手术切口类别代码名称',\r\n" + 
        		"  `incision_healing_code` varchar(128)  NOT NULL COMMENT '切口愈合等级代码',\r\n" + 
        		"  `incision_healing_name` varchar(2)  NOT NULL COMMENT '切口愈合等级代码名称',\r\n" + 
        		"  `anesthesia_code` varchar(2)  NOT NULL COMMENT '麻醉方式代码',\r\n" + 
        		"  `anesmethod_name` varchar(20)  NOT NULL COMMENT '麻醉方法名称',\r\n" + 
        		"  `anesthesiologist_code` varchar(30)  NOT NULL COMMENT '麻醉医师：编码',\r\n" + 
        		"  `anesthesiologist_name` varchar(40)  NOT NULL COMMENT '麻醉医师：姓名',\r\n" + 
        		"  `anes_idcard` varchar(18) NULL COMMENT '麻醉医师身份证号',\r\n" + 
        		"  `body_part` varchar(1)  NOT NULL COMMENT '手术部位编码',\r\n" + 
        		"  `body_part_name` varchar(10)  NOT NULL COMMENT '手术部位名称',\r\n" + 
        		"  `oper_duration` decimal(5,2)  NOT NULL COMMENT '手术持续时间(小时)',\r\n" + 
        		"  `anesthesia_level_code` varchar(2)  NOT NULL COMMENT '麻醉分级代码',\r\n" + 
        		"  `anesthesia_level_name` varchar(10)  NOT NULL COMMENT '麻醉分级代码名称',\r\n" + 
        		"  `asepsis_mark` varchar(1) NULL COMMENT '无菌手术标志',\r\n" + 
        		"  `if_main_oper` varchar(1) NULL COMMENT '是否主要手术',\r\n" + 
        		"  `if_ele_sur` varchar(1) NULL COMMENT '手术类别代码',\r\n" + 
        		"  `if_ele_sur_name` varchar(10) NULL COMMENT '手术类别代码名称',\r\n" + 
        		"  `dept_code` varchar(9) NULL COMMENT '手术科室编码',\r\n" + 
        		"  `dept_name` varchar(40) NULL COMMENT '手术科室名称',\r\n" + 
        		"  `rec_idcard` varchar(18) NULL COMMENT '记录人身份证号',\r\n" + 
        		"  `rec_man` varchar(40) NULL COMMENT '记录人姓名',\r\n" + 
        		"  `rcd_dt` datetime NULL COMMENT '记录日期时间',\r\n" + 
        		"  `pof_dt` datetime NULL COMMENT '归档日期时间',\r\n" + 
        		"  `state` int NULL COMMENT '状态',\r\n" + 
        		"  `deleted` boolean NULL COMMENT '删除标识',\r\n" + 
        		"  `create_by` bigint NULL COMMENT '创建人',\r\n" + 
        		"  `create_time` datetime NULL COMMENT '创建时间',\r\n" + 
        		"  `update_by` bigint NULL COMMENT '修改人',\r\n" + 
        		"  `update_time` datetime  NOT NULL COMMENT '修改时间',\r\n" + 
        		"  `business_time` datetime  NOT NULL COMMENT '业务时间'\r\n" + 
        		") ENGINE=OLAP \r\n" + 
        		"UNIQUE KEY(`id`) \r\n" + 
        		"COMMENT '住院病案首页-手术' \r\n" + 
        		"DISTRIBUTED BY HASH(`id`) BUCKETS 10 \r\n" + 
        		"PROPERTIES ( \r\n" + 
        		"\"replication_allocation\" = \"tag.location.default: 1\", \r\n" + 
        		"\"is_being_synced\" = \"false\", \r\n" + 
        		"\"storage_format\" = \"V2\", \r\n" + 
        		"\"light_schema_change\" = \"true\", \r\n" + 
        		"\"disable_auto_compaction\" = \"false\", \r\n" + 
        		"\"enable_single_replica_compaction\" = \"false\");\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"CREATE TABLE IF NOT EXISTS `ygt_db`.`inpatient_inrecord` (\r\n" + 
        		"  `id` bigint  NOT NULL COMMENT 'ID',\r\n" + 
        		"  `org_id` bigint NULL COMMENT '机构标识',\r\n" + 
        		"  `org_code` varchar(50)  NOT NULL COMMENT '机构编码',\r\n" + 
        		"  `org_name` varchar(50)  NOT NULL COMMENT '机构名称',\r\n" + 
        		"  `id_type_code` varchar(2) NULL COMMENT '身份证件类别代码',\r\n" + 
        		"  `id_type_name` varchar(20) NULL COMMENT '身份证件类别名称',\r\n" + 
        		"  `id_no` varchar(128) NULL COMMENT '身份证件号码',\r\n" + 
        		"  `name` varchar(40) NULL COMMENT '患者姓名',\r\n" + 
        		"  `inpat_form_no` varchar(128)  NOT NULL COMMENT '住院记录表编号',\r\n" + 
        		"  `sex_code` varchar(1) NULL COMMENT '性别代码',\r\n" + 
        		"  `gender` varchar(10) NULL COMMENT '患者性别',\r\n" + 
        		"  `birth_date` datetime NULL COMMENT '出生日期',\r\n" + 
        		"  `age` int NULL COMMENT '病人年龄',\r\n" + 
        		"  `tel_no` varchar(20) NULL COMMENT '本人电话',\r\n" + 
        		"  `hosp_category_code` varchar(1) NULL COMMENT '住院类别代码',\r\n" + 
        		"  `hosp_category_name` varchar(50) NULL COMMENT '住院类别名称',\r\n" + 
        		"  `address` varchar(200) NULL COMMENT '现详细住址',\r\n" + 
        		"  `employer_name` varchar(70) NULL COMMENT '工作单位名称',\r\n" + 
        		"  `birth_address` varchar(200) NULL COMMENT '出生地',\r\n" + 
        		"  `nationality_code` varchar(2) NULL COMMENT '民族代码',\r\n" + 
        		"  `nationality_name` varchar(10) NULL COMMENT '民族名称',\r\n" + 
        		"  `occupation_code` varchar(2) NULL COMMENT '从业状况（个人身份）代码',\r\n" + 
        		"  `occupation_name` varchar(10) NULL COMMENT '从业状况（个人身份）代码名称',\r\n" + 
        		"  `marriage_code` varchar(2) NULL COMMENT '婚姻状况代码',\r\n" + 
        		"  `marriage_name` varchar(10) NULL COMMENT '婚姻状况',\r\n" + 
        		"  `representor_relationship` varchar(2) NULL COMMENT '病历陈述者：关系',\r\n" + 
        		"  `representor_relationship_name` varchar(20) NULL COMMENT '病历陈述者：关系名称',\r\n" + 
        		"  `representor_name` varchar(128) NULL COMMENT '病历陈述者：姓名',\r\n" + 
        		"  `represent_dtime` datetime NULL COMMENT '陈述时间',\r\n" + 
        		"  `reliable_statement_flag` varchar(1) NULL COMMENT '陈述内容可靠标志',\r\n" + 
        		"  `author_id` varchar(30) NULL COMMENT '记录者：编号',\r\n" + 
        		"  `author_name` varchar(40) NULL COMMENT '记录者：姓名',\r\n" + 
        		"  `author_dtime` datetime NULL COMMENT '记录时间',\r\n" + 
        		"  `authenticator_id` varchar(30) NULL COMMENT '审核者：编号',\r\n" + 
        		"  `authenticator_name` varchar(40) NULL COMMENT '审核者：姓名',\r\n" + 
        		"  `authenticator_dtime` datetime NULL COMMENT '审核时间',\r\n" + 
        		"  `in_charge_doctor_id` varchar(30) NULL COMMENT '主治医师：编号',\r\n" + 
        		"  `in_charge_doctor_name` varchar(40) NULL COMMENT '主治医师：姓名',\r\n" + 
        		"  `in_charge_doctor_dtime` datetime NULL COMMENT '主治医师签名时间',\r\n" + 
        		"  `inrecord_type_code` varchar(10) NULL COMMENT '入院记录类型代码',\r\n" + 
        		"  `inrecord_type_name` varchar(20) NULL COMMENT '入院记录类型名称',\r\n" + 
        		"  `admission_dtime` datetime NULL COMMENT '入院时间',\r\n" + 
        		"  `death_dtime` datetime NULL COMMENT '死亡时间',\r\n" + 
        		"  `in_dept_code` varchar(9) NULL COMMENT '入院科室编码',\r\n" + 
        		"  `in_dept_name` varchar(40) NULL COMMENT '入院科室名称',\r\n" + 
        		"  `ward_id` varchar(36) NULL COMMENT '病区ID',\r\n" + 
        		"  `ward_name` varchar(50) NULL COMMENT '病区名称',\r\n" + 
        		"  `ward_room` varchar(10) NULL COMMENT '病房号',\r\n" + 
        		"  `bed_no` varchar(10) NULL COMMENT '床位号',\r\n" + 
        		"  `chief_complaints` varchar(2000) NULL COMMENT '主诉',\r\n" + 
        		"  `current_disease` varchar(2000) NULL COMMENT '现病史',\r\n" + 
        		"  `disease_history` varchar(2000) NULL COMMENT '既往史',\r\n" + 
        		"  `personal_history` varchar(2000) NULL COMMENT '个人史',\r\n" + 
        		"  `marriage_history` varchar(128) NULL COMMENT '婚育史',\r\n" + 
        		"  `menses_history` varchar(1000) NULL COMMENT '月经史',\r\n" + 
        		"  `family_history` varchar(2000) NULL COMMENT '家族史',\r\n" + 
        		"  `spec_situation` varchar(2000) NULL COMMENT '专科情况',\r\n" + 
        		"  `assist_exam_result` varchar(1000) NULL COMMENT '实验及辅助检查结果',\r\n" + 
        		"  `first_diagnosis` varchar(50) NULL COMMENT '初步诊断',\r\n" + 
        		"  `first_diagnosis_icd` varchar(24) NULL COMMENT '初步诊断代码',\r\n" + 
        		"  `inpat_diag_name` varchar(50) NULL COMMENT '入院诊断',\r\n" + 
        		"  `in_diagnosis_icd` varchar(24) NULL COMMENT '入院诊断代码',\r\n" + 
        		"  `in_condition_descr` varchar(4000) NULL COMMENT '入院情况描述',\r\n" + 
        		"  `treat_rescue_course` varchar(4000) NULL COMMENT '诊疗经过(含抢救情况)',\r\n" + 
        		"  `out_condition` varchar(4000) NULL COMMENT '出院情况',\r\n" + 
        		"  `out_diagnosis_name` varchar(50) NULL COMMENT '出院诊断',\r\n" + 
        		"  `out_diagnosis_code` varchar(24) NULL COMMENT '出院诊断代码',\r\n" + 
        		"  `out_order` varchar(128) NULL COMMENT '出院医嘱',\r\n" + 
        		"  `treatment_result` varchar(1) NULL COMMENT '治疗结果代码',\r\n" + 
        		"  `treat_result_name` varchar(2) NULL COMMENT '治疗结果',\r\n" + 
        		"  `death_cause` varchar(128) NULL COMMENT '死亡原因描述',\r\n" + 
        		"  `death_diagnosis` varchar(24) NULL COMMENT '死亡诊断代码',\r\n" + 
        		"  `death_diagnosis_name` varchar(50) NULL COMMENT '死亡诊断',\r\n" + 
        		"  `general_health_flag` varchar(1) NULL COMMENT '一般健康状况标志',\r\n" + 
        		"  `infectious_flag` varchar(1) NULL COMMENT '患者传染性标志',\r\n" + 
        		"  `infection_history` varchar(1000) NULL COMMENT '传染病史',\r\n" + 
        		"  `vaccinate_history` varchar(4000) NULL COMMENT '预防接种史',\r\n" + 
        		"  `operation_history` varchar(1000) NULL COMMENT '手术史',\r\n" + 
        		"  `blood_history` varchar(4000) NULL COMMENT '输血史',\r\n" + 
        		"  `allergy_history` varchar(100) NULL COMMENT '过敏史',\r\n" + 
        		"  `tcm_observe` varchar(2000) NULL COMMENT '中医“四诊”观察结果',\r\n" + 
        		"  `therapeutic_principles` varchar(2000) NULL COMMENT '治则治法',\r\n" + 
        		"  `accept_physician_code` varchar(30) NULL COMMENT '接诊医师编号',\r\n" + 
        		"  `accept_physician` varchar(40) NULL COMMENT '接诊医师签名',\r\n" + 
        		"  `resident_doctor_code` varchar(30) NULL COMMENT '住院医师编号',\r\n" + 
        		"  `resident_doctor_name` varchar(40) NULL COMMENT '住院医师签名',\r\n" + 
        		"  `chief_doctor_id` varchar(30) NULL COMMENT '主任(副主任)医师ID',\r\n" + 
        		"  `chief_doctor_name` varchar(40) NULL COMMENT '主任(副主任)医师签名',\r\n" + 
        		"  `tend_dept_code` varchar(30) NULL COMMENT '护理科室代码',\r\n" + 
        		"  `visit_tend_dept_name` varchar(40) NULL COMMENT '护理科室名称',\r\n" + 
        		"  `nurse_name` varchar(40) NULL COMMENT '主管护士：姓名',\r\n" + 
        		"  `nurse_id` varchar(30) NULL COMMENT '主管护士：编号',\r\n" + 
        		"  `source_code` varchar(1)  NOT NULL COMMENT '入院病人来源代码',\r\n" + 
        		"  `source_name` varchar(10) NULL COMMENT '入院病人来源代码',\r\n" + 
        		"  `providehx_name` varchar(40) NULL COMMENT '供史者姓名',\r\n" + 
        		"  `rela_code` varchar(2) NULL COMMENT '与病人关系代码',\r\n" + 
        		"  `rela_name` varchar(16) NULL COMMENT '与病人关系名称',\r\n" + 
        		"  `temperature` decimal(4,1) NULL COMMENT '体格检查-体温(℃)',\r\n" + 
        		"  `pulses` smallint NULL COMMENT '体格检查-脉率(次/min)',\r\n" + 
        		"  `respiration` smallint NULL COMMENT '体格检查-呼吸频率(次/min)',\r\n" + 
        		"  `sbp` smallint NULL COMMENT '体格检査-收缩压(mm-Hg)',\r\n" + 
        		"  `dbp` smallint NULL COMMENT '体格检查-舒张压(mmHg)',\r\n" + 
        		"  `height` decimal(5,1) NULL COMMENT '体格检查-身高(cm)',\r\n" + 
        		"  `weight` decimal(6,2) NULL COMMENT '体格检查-体重(kg)',\r\n" + 
        		"  `common_status` varchar(1000) NULL COMMENT '体格检查-一般状况检查结果',\r\n" + 
        		"  `skin` varchar(1000) NULL COMMENT '体格检查-皮肤和黏膜检查结果',\r\n" + 
        		"  `lymph` varchar(1000) NULL COMMENT '体格检查-全身浅表淋巴结检查结果',\r\n" + 
        		"  `head` varchar(1000) NULL COMMENT '体格检查-头部及其器官检查结果',\r\n" + 
        		"  `neck` varchar(1000) NULL COMMENT '体格检查-颈部检查结果',\r\n" + 
        		"  `chest` varchar(1000) NULL COMMENT '体格检查-胸部检查结果',\r\n" + 
        		"  `abdomen` varchar(1000) NULL COMMENT '体格检查-腹部检查结果',\r\n" + 
        		"  `anus` varchar(1000) NULL COMMENT '体格检查-肛门指诊检查结果描述',\r\n" + 
        		"  `genitalia` varchar(1000) NULL COMMENT '体格检查-外生殖器检查结果',\r\n" + 
        		"  `spine_medical` varchar(1000) NULL COMMENT '体格检查-脊柱检查结果',\r\n" + 
        		"  `limbs_medical` varchar(1000) NULL COMMENT '体格检查-四肢检查结果',\r\n" + 
        		"  `neural` varchar(1000) NULL COMMENT '体格检查-神经系统检查结果',\r\n" + 
        		"  `state` int NULL COMMENT '状态',\r\n" + 
        		"  `deleted` boolean NULL COMMENT '删除标识',\r\n" + 
        		"  `create_by` bigint NULL COMMENT '创建人',\r\n" + 
        		"  `create_time` datetime NULL COMMENT '创建时间',\r\n" + 
        		"  `update_by` bigint NULL COMMENT '修改人',\r\n" + 
        		"  `update_time` datetime  NOT NULL COMMENT '修改时间',\r\n" + 
        		"  `business_time` datetime  NOT NULL COMMENT '业务时间'\r\n" + 
        		") ENGINE=OLAP \r\n" + 
        		"UNIQUE KEY(`id`) \r\n" + 
        		"COMMENT '入院记录' \r\n" + 
        		"DISTRIBUTED BY HASH(`id`) BUCKETS 10 \r\n" + 
        		"PROPERTIES ( \r\n" + 
        		"\"replication_allocation\" = \"tag.location.default: 1\", \r\n" + 
        		"\"is_being_synced\" = \"false\", \r\n" + 
        		"\"storage_format\" = \"V2\", \r\n" + 
        		"\"light_schema_change\" = \"true\", \r\n" + 
        		"\"disable_auto_compaction\" = \"false\", \r\n" + 
        		"\"enable_single_replica_compaction\" = \"false\");\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"CREATE TABLE IF NOT EXISTS `ygt_db`.`inpatient_outsummary` (\r\n" + 
        		"  `id` bigint  NOT NULL COMMENT 'ID',\r\n" + 
        		"  `org_id` bigint NULL COMMENT '机构标识',\r\n" + 
        		"  `org_code` varchar(50)  NOT NULL COMMENT '机构编码',\r\n" + 
        		"  `org_name` varchar(50)  NOT NULL COMMENT '机构名称',\r\n" + 
        		"  `id_type_code` varchar(2) NULL COMMENT '身份证件类别代码',\r\n" + 
        		"  `id_type_name` varchar(20) NULL COMMENT '身份证件类别名称',\r\n" + 
        		"  `id_no` varchar(128) NULL COMMENT '身份证件号码',\r\n" + 
        		"  `name` varchar(40) NULL COMMENT '患者姓名',\r\n" + 
        		"  `tel_no` varchar(20) NULL COMMENT '本人电话',\r\n" + 
        		"  `inpat_form_no` varchar(128)  NOT NULL COMMENT '住院记录表编号',\r\n" + 
        		"  `sex_code` varchar(1) NULL COMMENT '性别代码',\r\n" + 
        		"  `gender` varchar(10) NULL COMMENT '患者性别',\r\n" + 
        		"  `birth_date` datetime NULL COMMENT '病人出生日期',\r\n" + 
        		"  `age` smallint NULL COMMENT '病人年龄',\r\n" + 
        		"  `age_unit_code` varchar(1) NULL COMMENT '年龄单位代码',\r\n" + 
        		"  `age_unit_name` varchar(20) NULL COMMENT '年龄单位名称',\r\n" + 
        		"  `hosp_category_code` varchar(1) NULL COMMENT '住院类别代码',\r\n" + 
        		"  `hosp_category_name` varchar(50) NULL COMMENT '住院类别名称',\r\n" + 
        		"  `discharge_class_code` varchar(1) NULL COMMENT '离院方式代码',\r\n" + 
        		"  `discharge_class_name` varchar(30) NULL COMMENT '离院方式名称',\r\n" + 
        		"  `address` varchar(200) NULL COMMENT '现详细住址',\r\n" + 
        		"  `employer_name` varchar(70) NULL COMMENT '工作单位名称',\r\n" + 
        		"  `birth_address` varchar(200) NULL COMMENT '出生地',\r\n" + 
        		"  `nationality_code` varchar(2) NULL COMMENT '民族代码',\r\n" + 
        		"  `nationality_name` varchar(10) NULL COMMENT '民族名称',\r\n" + 
        		"  `occupation_code` varchar(30) NULL COMMENT '职业类别代码',\r\n" + 
        		"  `occupation_name` varchar(10) NULL COMMENT '职业类别名称',\r\n" + 
        		"  `marriage_code` varchar(2) NULL COMMENT '婚姻状况代码',\r\n" + 
        		"  `marriage_name` varchar(10) NULL COMMENT '婚姻状况',\r\n" + 
        		"  `resident_doctor_id` varchar(30) NULL COMMENT '住院医师：编号',\r\n" + 
        		"  `resident_doctor_name` varchar(40) NULL COMMENT '住院医师：姓名',\r\n" + 
        		"  `resident_doctor_dtime` datetime NULL COMMENT '住院医师签名时间',\r\n" + 
        		"  `in_charge_doctor_id` varchar(30)  NOT NULL COMMENT '主治医师：编号',\r\n" + 
        		"  `in_charge_doctor_name` varchar(40)  NOT NULL COMMENT '主治医师：姓名',\r\n" + 
        		"  `in_charge_doctor_dtime` datetime  NOT NULL COMMENT '主治医师签名时间',\r\n" + 
        		"  `at_doc_idcard` varchar(18) NULL COMMENT '主治医师身份证号',\r\n" + 
        		"  `parent_doctor_id` varchar(30) NULL COMMENT '上级医师ID',\r\n" + 
        		"  `parent_doctor_name` varchar(40) NULL COMMENT '上级医师签名',\r\n" + 
        		"  `outsummary_type_code` varchar(10)  NOT NULL COMMENT '出院小结类型',\r\n" + 
        		"  `outsummary_type_name` varchar(20)  NOT NULL COMMENT '出院小结名称',\r\n" + 
        		"  `admission_dtime` datetime NULL COMMENT '入院时间',\r\n" + 
        		"  `discharge_dtime` datetime NULL COMMENT '出院时间',\r\n" + 
        		"  `in_dept_code` varchar(30) NULL COMMENT '入院科室编码',\r\n" + 
        		"  `in_dept_name` varchar(40) NULL COMMENT '入院科室名称',\r\n" + 
        		"  `ward_name` varchar(50) NULL COMMENT '病区名称',\r\n" + 
        		"  `ward_room` varchar(10) NULL COMMENT '病房号',\r\n" + 
        		"  `bed_no` varchar(18) NULL COMMENT '床位号',\r\n" + 
        		"  `in_hospital_days` int NULL COMMENT '住院天数',\r\n" + 
        		"  `in_diagnosis_icd` varchar(24)  NOT NULL COMMENT '入院诊断代码',\r\n" + 
        		"  `inpat_diag_name` varchar(50)  NOT NULL COMMENT '入院诊断',\r\n" + 
        		"  `in_condition_descr` varchar(4000)  NOT NULL COMMENT '入院情况描述',\r\n" + 
        		"  `treat_rescue_course` varchar(4000)  NOT NULL COMMENT '诊疗经过(含抢救情况)',\r\n" + 
        		"  `out_condition` varchar(4000)  NOT NULL COMMENT '出院情况',\r\n" + 
        		"  `out_diagnosis_code` varchar(24)  NOT NULL COMMENT '出院诊断代码',\r\n" + 
        		"  `out_diagnosis_name` varchar(50)  NOT NULL COMMENT '出院诊断',\r\n" + 
        		"  `out_order` varchar(128)  NOT NULL COMMENT '出院医嘱',\r\n" + 
        		"  `treatment_result` varchar(1) NULL COMMENT '治疗结果代码',\r\n" + 
        		"  `treat_result_name` varchar(2) NULL COMMENT '治疗结果',\r\n" + 
        		"  `auxiliary_positive_result` varchar(4000) NULL COMMENT '阳性辅助检查结果',\r\n" + 
        		"  `tcm_observe` varchar(2000) NULL COMMENT '中医“四诊”观察结果',\r\n" + 
        		"  `operation_describe` varchar(2000) NULL COMMENT '手术过程',\r\n" + 
        		"  `therapeutic_principles` varchar(2000) NULL COMMENT '治则治法',\r\n" + 
        		"  `tcm_decoction_method` varchar(200) NULL COMMENT '中药煎煮方法',\r\n" + 
        		"  `tcm_use_method` varchar(200) NULL COMMENT '中药用药方法',\r\n" + 
        		"  `discharge_symptom_sign` varchar(2000) NULL COMMENT '出院时症状与体征',\r\n" + 
        		"  `guard_name` varchar(40) NULL COMMENT '陪伴者姓名',\r\n" + 
        		"  `relat_code` varchar(2) NULL COMMENT '陪伴者与本人关系编码',\r\n" + 
        		"  `relat_name` varchar(16) NULL COMMENT '陪伴者与本人关系名称',\r\n" + 
        		"  `comp_phone` varchar(16) NULL COMMENT '陪伴者联系电话',\r\n" + 
        		"  `mr_no` varchar(36) NULL COMMENT '病案号',\r\n" + 
        		"  `wound_type` varchar(40) NULL COMMENT '伤口愈合',\r\n" + 
        		"  `out_dept_code` varchar(9) NULL COMMENT '出院科室编码',\r\n" + 
        		"  `out_dept_name` varchar(40) NULL COMMENT '出院科室名称',\r\n" + 
        		"  `doc_idcard` varchar(18) NULL COMMENT '医生身份证号',\r\n" + 
        		"  `doc_name` varchar(40) NULL COMMENT '医师姓名',\r\n" + 
        		"  `rcd_dt` datetime NULL COMMENT '记录日期时间',\r\n" + 
        		"  `pof_dt` datetime NULL COMMENT '归档日期时间',\r\n" + 
        		"  `addr_type_code` varchar(2) NULL COMMENT '地址类别代码',\r\n" + 
        		"  `addr_type_name` varchar(10) NULL COMMENT '地址类别名称',\r\n" + 
        		"  `present_addr_provi` varchar(70) NULL COMMENT '地址-省(自治区、直辖市)',\r\n" + 
        		"  `present_addr_city` varchar(70) NULL COMMENT '地址-市(地区、州)',\r\n" + 
        		"  `present_addr_county` varchar(70) NULL COMMENT '地址-县(区)',\r\n" + 
        		"  `present_addr_town` varchar(70) NULL COMMENT '地址-乡(镇、街道办事处)',\r\n" + 
        		"  `present_addr_village` varchar(70) NULL COMMENT '地址-村(街、路、弄等)',\r\n" + 
        		"  `present_addr_hou_no` varchar(70) NULL COMMENT '地址-门牌号码',\r\n" + 
        		"  `postal_code` varchar(6) NULL COMMENT '地址-邮政编码',\r\n" + 
        		"  `reversion_code` varchar(1) NULL COMMENT '病情转归代码',\r\n" + 
        		"  `reversion_name` varchar(10) NULL COMMENT '病情转归名称',\r\n" + 
        		"  `contact_name` varchar(40) NULL COMMENT '联系人姓名',\r\n" + 
        		"  `contact_tel_no` varchar(16) NULL COMMENT '联系人电话号码',\r\n" + 
        		"  `main_diag_mark` varchar(1) NULL COMMENT '主诊断标识',\r\n" + 
        		"  `state` int NULL COMMENT '状态',\r\n" + 
        		"  `deleted` boolean NULL COMMENT '删除标识',\r\n" + 
        		"  `create_by` bigint NULL COMMENT '创建人',\r\n" + 
        		"  `create_time` datetime NULL COMMENT '创建时间',\r\n" + 
        		"  `update_by` bigint NULL COMMENT '修改人',\r\n" + 
        		"  `update_time` datetime  NOT NULL COMMENT '修改时间',\r\n" + 
        		"  `business_time` datetime  NOT NULL COMMENT '业务时间'\r\n" + 
        		") ENGINE=OLAP \r\n" + 
        		"UNIQUE KEY(`id`) \r\n" + 
        		"COMMENT '出院小结' \r\n" + 
        		"DISTRIBUTED BY HASH(`id`) BUCKETS 10 \r\n" + 
        		"PROPERTIES ( \r\n" + 
        		"\"replication_allocation\" = \"tag.location.default: 1\", \r\n" + 
        		"\"is_being_synced\" = \"false\", \r\n" + 
        		"\"storage_format\" = \"V2\", \r\n" + 
        		"\"light_schema_change\" = \"true\", \r\n" + 
        		"\"disable_auto_compaction\" = \"false\", \r\n" + 
        		"\"enable_single_replica_compaction\" = \"false\");\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"CREATE TABLE IF NOT EXISTS `ygt_db`.`exammaster` (\r\n" + 
        		"  `id` bigint  NOT NULL COMMENT 'ID',\r\n" + 
        		"  `org_id` bigint NULL COMMENT '机构标识',\r\n" + 
        		"  `org_code` varchar(50)  NOT NULL COMMENT '机构编码',\r\n" + 
        		"  `org_name` varchar(50)  NOT NULL COMMENT '机构名称',\r\n" + 
        		"  `health_card_no` varchar(36) NULL COMMENT '居民健康卡号',\r\n" + 
        		"  `report_form_no` varchar(128)  NOT NULL COMMENT '检查报告单号',\r\n" + 
        		"  `event_type` smallint  NOT NULL COMMENT '事件类型',\r\n" + 
        		"  `event_type_name` varchar(10)  NOT NULL COMMENT '时间类型名称',\r\n" + 
        		"  `event_no` varchar(128)  NOT NULL COMMENT '事件号',\r\n" + 
        		"  `patient_type_code` varchar(1) NULL COMMENT '患者类型代码',\r\n" + 
        		"  `patient_type_name` varchar(2) NULL COMMENT '患者类型名称',\r\n" + 
        		"  `patient_id` varchar(128)  NOT NULL COMMENT '患者ID',\r\n" + 
        		"  `name` varchar(40)  NOT NULL COMMENT '患者姓名',\r\n" + 
        		"  `sex_code` varchar(1)  NOT NULL COMMENT '性别代码',\r\n" + 
        		"  `gender` varchar(10)  NOT NULL COMMENT '性别',\r\n" + 
        		"  `age_year` smallint NULL COMMENT '年龄(岁)',\r\n" + 
        		"  `age_month` varchar(8) NULL COMMENT '年龄(月)',\r\n" + 
        		"  `age` smallint NULL COMMENT '年龄',\r\n" + 
        		"  `age_unit_code` varchar(1) NULL COMMENT '年龄单位代码',\r\n" + 
        		"  `age_unit_name` varchar(20) NULL COMMENT '年龄单位名称',\r\n" + 
        		"  `id_type_code` varchar(2)  NOT NULL COMMENT '身份证件类别代码',\r\n" + 
        		"  `id_type_name` varchar(20)  NOT NULL COMMENT '身份证件类别名称',\r\n" + 
        		"  `id_no` varchar(128)  NOT NULL COMMENT '身份证件号码',\r\n" + 
        		"  `tel_no` varchar(16) NULL COMMENT '电话号码',\r\n" + 
        		"  `birth_date` datetime NULL COMMENT '患者出生日期',\r\n" + 
        		"  `retrieve_date` datetime  NOT NULL COMMENT '归档检索日期',\r\n" + 
        		"  `diagnosis_code` varchar(200) NULL COMMENT '诊断代码',\r\n" + 
        		"  `diagnosis_name` varchar(2000) NULL COMMENT '诊断名称',\r\n" + 
        		"  `class_type_code` varchar(3)  NOT NULL COMMENT '检查分类的标准编码',\r\n" + 
        		"  `class_type_name` varchar(20)  NOT NULL COMMENT '检查分类的标准名称',\r\n" + 
        		"  `exam_site_code` varchar(2) NULL COMMENT '检查部位的标准编码',\r\n" + 
        		"  `exam_site` varchar(10) NULL COMMENT '检查部位',\r\n" + 
        		"  `exam_item_code` varchar(128)  NOT NULL COMMENT '检查项目的标准编码',\r\n" + 
        		"  `exam_item_name` varchar(128)  NOT NULL COMMENT '检查项目名称',\r\n" + 
        		"  `report_title` varchar(256) NULL COMMENT '报告的标题',\r\n" + 
        		"  `effective_dtime` datetime NULL COMMENT '文档创建时间',\r\n" + 
        		"  `confidentiality` varchar(128) NULL COMMENT '保密级别',\r\n" + 
        		"  `author_id` varchar(30)  NOT NULL COMMENT '填报者：编号',\r\n" + 
        		"  `report_create_dtime` datetime  NOT NULL COMMENT '报告生成时间',\r\n" + 
        		"  `author_name` varchar(40)  NOT NULL COMMENT '填报者：姓名',\r\n" + 
        		"  `author_id_no` varchar(18) NULL COMMENT '填报者身份证号',\r\n" + 
        		"  `authenticator_id` varchar(30)  NOT NULL COMMENT '审核者：编号',\r\n" + 
        		"  `authenticator_dtime` datetime  NOT NULL COMMENT '审核者：审核时间',\r\n" + 
        		"  `authenticator_name` varchar(40)  NOT NULL COMMENT '审核者：姓名',\r\n" + 
        		"  `authenticator_id_no` varchar(18) NULL COMMENT '审核者身份证号',\r\n" + 
        		"  `participant_dept` varchar(40)  NOT NULL COMMENT '申请科室',\r\n" + 
        		"  `participant_dept_code` varchar(9)  NOT NULL COMMENT '申请科室代码',\r\n" + 
        		"  `participant_id` varchar(30)  NOT NULL COMMENT '申请医生：编号',\r\n" + 
        		"  `participant_dtime` datetime NULL COMMENT '申请医生：申请时间',\r\n" + 
        		"  `participant_name` varchar(40)  NOT NULL COMMENT '申请医生：姓名',\r\n" + 
        		"  `order_id` varchar(128)  NOT NULL COMMENT '对应的医嘱：医嘱号',\r\n" + 
        		"  `order_priority` varchar(128) NULL COMMENT '对应的医嘱：优先级',\r\n" + 
        		"  `performer_dept_code` varchar(9)  NOT NULL COMMENT '检查的执行科室代码',\r\n" + 
        		"  `Performer_dept_name` varchar(40)  NOT NULL COMMENT '检查的执行科室名称',\r\n" + 
        		"  `performer_doctor_code` varchar(30) NULL COMMENT '检查的执行医生代码',\r\n" + 
        		"  `performer_doctor` varchar(40) NULL COMMENT '检查的执行医生',\r\n" + 
        		"  `exam_performer_dtime` datetime NULL COMMENT '检查的执行时间',\r\n" + 
        		"  `outpat_diag_name` varchar(200) NULL COMMENT '临床诊断',\r\n" + 
        		"  `patient_condition_descr` varchar(4000) NULL COMMENT '病情描述',\r\n" + 
        		"  `exam_purpose` varchar(4000) NULL COMMENT '检查目的',\r\n" + 
        		"  `image_descr` varchar(4000) NULL COMMENT '影像所见',\r\n" + 
        		"  `is_abnormal` varchar(1) NULL COMMENT '是否异常',\r\n" + 
        		"  `rad_mark` varchar(1) NULL COMMENT '是否放射性',\r\n" + 
        		"  `conclusion` varchar(4000)  NOT NULL COMMENT '影像结论',\r\n" + 
        		"  `recognition` varchar(1) NULL COMMENT '可互认标志',\r\n" + 
        		"  `exam_result_code` varchar(2) NULL COMMENT '检查结果代码',\r\n" + 
        		"  `exam_result_name` varchar(10) NULL COMMENT '检查结果名称',\r\n" + 
        		"  `exam_quantitive_result` decimal(20,4) NULL COMMENT '检查定量结果',\r\n" + 
        		"  `quantitive_unit` varchar(200) NULL COMMENT '检查定量结果计量单位',\r\n" + 
        		"  `special_flag` varchar(1) NULL COMMENT '特殊检查标志',\r\n" + 
        		"  `intervention` varchar(200) NULL COMMENT '介入物名称',\r\n" + 
        		"  `operation_way_descr` varchar(2000) NULL COMMENT '操作方法描述',\r\n" + 
        		"  `operation_code` varchar(20) NULL COMMENT '操作编码',\r\n" + 
        		"  `operation_name` varchar(200) NULL COMMENT '操作名称',\r\n" + 
        		"  `operation_time` datetime NULL COMMENT '操作日期时间',\r\n" + 
        		"  `operation_count` decimal(20) NULL COMMENT '操作次数',\r\n" + 
        		"  `anesthesia_code` varchar(2) NULL COMMENT '麻醉方法代码',\r\n" + 
        		"  `anesthesia_name` varchar(20) NULL COMMENT '麻醉方法名称',\r\n" + 
        		"  `anesthetic_observation` varchar(2000) NULL COMMENT '麻醉观察结果',\r\n" + 
        		"  `anesthetic_class_code` varchar(1) NULL COMMENT '麻醉中西医标识代码',\r\n" + 
        		"  `anesthetic_class_name` varchar(4) NULL COMMENT '麻醉中西医标识名称',\r\n" + 
        		"  `anesthetic_doctor_code` varchar(30) NULL COMMENT '麻醉医师ID',\r\n" + 
        		"  `anesthetic_doctor` varchar(40) NULL COMMENT '麻醉医师签名',\r\n" + 
        		"  `diag_process_descr` varchar(4000) NULL COMMENT '诊疗过程描述',\r\n" + 
        		"  `specimen_type_descr` varchar(200) NULL COMMENT '标本类别描述',\r\n" + 
        		"  `specimen_type` varchar(40) NULL COMMENT '标本类别',\r\n" + 
        		"  `check_type_code` varchar(20) NULL COMMENT '检查类型代码',\r\n" + 
        		"  `check_type_name` varchar(100) NULL COMMENT '检查类型名称',\r\n" + 
        		"  `specimen_no` varchar(200) NULL COMMENT '检查标本号',\r\n" + 
        		"  `specimen_status` varchar(200) NULL COMMENT '标本状态',\r\n" + 
        		"  `specimen_fixative` varchar(200) NULL COMMENT '标本固定液名称',\r\n" + 
        		"  `specimen_sample_time` datetime NULL COMMENT '标本采样日期时间',\r\n" + 
        		"  `specimen_receive_time` datetime NULL COMMENT '接收标本日期时间',\r\n" + 
        		"  `check_method_name` varchar(200) NULL COMMENT '检查方法名称',\r\n" + 
        		"  `check_pos_code` varchar(20) NULL COMMENT '检查方位代码',\r\n" + 
        		"  `check_pos_name` varchar(100) NULL COMMENT '检查方位名称',\r\n" + 
        		"  `exam_technician_code` varchar(30) NULL COMMENT '检查技师代码',\r\n" + 
        		"  `exam_technician` varchar(40) NULL COMMENT '检查技师签名',\r\n" + 
        		"  `diag_date` datetime NULL COMMENT '诊断日期',\r\n" + 
        		"  `check_date` datetime NULL COMMENT '检查日期',\r\n" + 
        		"  `chief_complaints` varchar(2000) NULL COMMENT '主诉',\r\n" + 
        		"  `symptom_start_time` datetime NULL COMMENT '症状开始日期时间',\r\n" + 
        		"  `symptom_end_time` datetime NULL COMMENT '症状停止日期时间',\r\n" + 
        		"  `narcode_no` varchar(128) NULL COMMENT '条形码',\r\n" + 
        		"  `exam_device` varchar(128) NULL COMMENT '检查设备编号',\r\n" + 
        		"  `exam_device_name` varchar(128) NULL COMMENT '检查设备名称',\r\n" + 
        		"  `register_time` datetime NULL COMMENT '登记时间',\r\n" + 
        		"  `register_operator_code` varchar(30) NULL COMMENT '登记人代码',\r\n" + 
        		"  `register_operator` varchar(40) NULL COMMENT '登记人',\r\n" + 
        		"  `print_time` datetime NULL COMMENT '打印时间',\r\n" + 
        		"  `print_operator` varchar(40) NULL COMMENT '打印人',\r\n" + 
        		"  `exam_result_objective` varchar(4000) NULL COMMENT '检查报告结果-客观所见',\r\n" + 
        		"  `exam_result_subjective` varchar(4000) NULL COMMENT '检查报告结果-主观提示',\r\n" + 
        		"  `report_remark` varchar(1000) NULL COMMENT '检查报告备注',\r\n" + 
        		"  `file_archive_path` varchar(1000) NULL COMMENT '文件归档路径',\r\n" + 
        		"  `img_archive_path` varchar(1000) NULL COMMENT '图片归档路径',\r\n" + 
        		"  `access_url` varchar(1000) NULL COMMENT 'url调阅地址',\r\n" + 
        		"  `state` int NULL COMMENT '状态',\r\n" + 
        		"  `deleted` boolean NULL COMMENT '删除标识',\r\n" + 
        		"  `create_by` bigint NULL COMMENT '创建人',\r\n" + 
        		"  `create_time` datetime NULL COMMENT '创建时间',\r\n" + 
        		"  `update_by` bigint NULL COMMENT '修改人',\r\n" + 
        		"  `update_time` datetime  NOT NULL COMMENT '修改时间',\r\n" + 
        		"  `business_time` datetime  NOT NULL COMMENT '业务时间'\r\n" + 
        		") ENGINE=OLAP \r\n" + 
        		"UNIQUE KEY(`id`) \r\n" + 
        		"COMMENT '检查报告主表' \r\n" + 
        		"DISTRIBUTED BY HASH(`id`) BUCKETS 10 \r\n" + 
        		"PROPERTIES ( \r\n" + 
        		"\"replication_allocation\" = \"tag.location.default: 1\", \r\n" + 
        		"\"is_being_synced\" = \"false\", \r\n" + 
        		"\"storage_format\" = \"V2\", \r\n" + 
        		"\"light_schema_change\" = \"true\", \r\n" + 
        		"\"disable_auto_compaction\" = \"false\", \r\n" + 
        		"\"enable_single_replica_compaction\" = \"false\");\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"CREATE TABLE IF NOT EXISTS `ygt_db`.`labmaster` (\r\n" + 
        		"  `id` bigint  NOT NULL COMMENT 'ID',\r\n" + 
        		"  `org_id` bigint NULL COMMENT '机构标识',\r\n" + 
        		"  `org_code` varchar(50)  NOT NULL COMMENT '机构编码',\r\n" + 
        		"  `org_name` varchar(50)  NOT NULL COMMENT '机构名称',\r\n" + 
        		"  `health_card_no` varchar(36) NULL COMMENT '居民健康卡号',\r\n" + 
        		"  `patient_id` varchar(128)  NOT NULL COMMENT '患者ID',\r\n" + 
        		"  `event_type` smallint  NOT NULL COMMENT '事件类型',\r\n" + 
        		"  `event_type_name` varchar(10)  NOT NULL COMMENT '时间类型名称',\r\n" + 
        		"  `event_no` varchar(128)  NOT NULL COMMENT '事件号',\r\n" + 
        		"  `patient_type_code` varchar(1) NULL COMMENT '患者类型代码',\r\n" + 
        		"  `patient_type_name` varchar(2) NULL COMMENT '患者类型名称',\r\n" + 
        		"  `age_year` smallint NULL COMMENT '年龄(岁)',\r\n" + 
        		"  `age_month` varchar(8) NULL COMMENT '年龄(月)',\r\n" + 
        		"  `age` smallint NULL COMMENT '年龄',\r\n" + 
        		"  `age_unit_code` varchar(1) NULL COMMENT '年龄单位代码',\r\n" + 
        		"  `age_unit_name` varchar(20) NULL COMMENT '年龄单位名称',\r\n" + 
        		"  `tel_no` varchar(16) NULL COMMENT '本人电话号码',\r\n" + 
        		"  `id_type_code` varchar(2)  NOT NULL COMMENT '身份证件类别代码',\r\n" + 
        		"  `id_type_name` varchar(50)  NOT NULL COMMENT '身份证件类别名称',\r\n" + 
        		"  `id_no` varchar(128)  NOT NULL COMMENT '身份证件号码',\r\n" + 
        		"  `name` varchar(40)  NOT NULL COMMENT '患者姓名',\r\n" + 
        		"  `sex_code` varchar(1)  NOT NULL COMMENT '性别代码',\r\n" + 
        		"  `gender` varchar(10)  NOT NULL COMMENT '性别',\r\n" + 
        		"  `report_form_no` varchar(128)  NOT NULL COMMENT '检验报告单号',\r\n" + 
        		"  `report_form_name` varchar(30) NULL COMMENT '检查报告单名称',\r\n" + 
        		"  `report_title` varchar(256) NULL COMMENT '报告的标题',\r\n" + 
        		"  `retrieve_date` datetime NULL COMMENT '归档检索日期',\r\n" + 
        		"  `effective_dtime` datetime NULL COMMENT '文档创建时间',\r\n" + 
        		"  `catalog_code` varchar(128) NULL COMMENT '检验报告的分类的LOINC编码',\r\n" + 
        		"  `catalog_name` varchar(128)  NOT NULL COMMENT '检验报告类别名称',\r\n" + 
        		"  `author_id` varchar(30)  NOT NULL COMMENT '填报者：编号',\r\n" + 
        		"  `author_name` varchar(40)  NOT NULL COMMENT '填报者：姓名',\r\n" + 
        		"  `report_create_dtime` datetime  NOT NULL COMMENT '报告生成时间',\r\n" + 
        		"  `authenticator_id` varchar(30)  NOT NULL COMMENT '审核者：编号',\r\n" + 
        		"  `authenticator_name` varchar(40)  NOT NULL COMMENT '审核者：姓名',\r\n" + 
        		"  `authenticator_dtime` datetime  NOT NULL COMMENT '审核者：审核时间',\r\n" + 
        		"  `participant_id` varchar(30)  NOT NULL COMMENT '申请医生：编号',\r\n" + 
        		"  `participant_name` varchar(40)  NOT NULL COMMENT '申请医生：姓名',\r\n" + 
        		"  `participant_dept` varchar(40)  NOT NULL COMMENT '申请医生：科室',\r\n" + 
        		"  `participant_dept_code` varchar(9)  NOT NULL COMMENT '申请医生：科室代码',\r\n" + 
        		"  `participant_dtime` datetime NULL COMMENT '申请医生：申请时间',\r\n" + 
        		"  `order_id` varchar(128) NULL COMMENT '对应的医嘱：医嘱号',\r\n" + 
        		"  `order_priority` varchar(128) NULL COMMENT '对应的医嘱：优先级',\r\n" + 
        		"  `specimen_id` varchar(128) NULL COMMENT '标本编号',\r\n" + 
        		"  `specimen_name` varchar(128)  NOT NULL COMMENT '标本名称',\r\n" + 
        		"  `specimen_class` varchar(128) NULL COMMENT '标本类型',\r\n" + 
        		"  `specimen_determiner_code` varchar(2) NULL COMMENT '标本采集部位代码',\r\n" + 
        		"  `specimen_determiner_name` varchar(10) NULL COMMENT '标本采集部位名称',\r\n" + 
        		"  `specimen_risk` varchar(3) NULL COMMENT '标本危险程度代码',\r\n" + 
        		"  `specimen_risk_name` varchar(20) NULL COMMENT '标本危险程度名称',\r\n" + 
        		"  `specimen_quantity` varchar(1) NULL COMMENT '标本质量代码',\r\n" + 
        		"  `specimen_quantity_name` varchar(5) NULL COMMENT '标本质量名称',\r\n" + 
        		"  `specimen_rejectreason` varchar(2) NULL COMMENT '标本拒绝原因代码',\r\n" + 
        		"  `specimen_rejectreason_name` varchar(10) NULL COMMENT '标本拒绝原因名称',\r\n" + 
        		"  `specimen_status` varchar(200) NULL COMMENT '标本状态',\r\n" + 
        		"  `performer_dept_code` varchar(9)  NOT NULL COMMENT '检验的执行科室代码',\r\n" + 
        		"  `performer_dept_name` varchar(40)  NOT NULL COMMENT '检验的执行科室名称',\r\n" + 
        		"  `performer_doctor_code` varchar(30)  NOT NULL COMMENT '检验的执行医师代码',\r\n" + 
        		"  `performer_doctor` varchar(40)  NOT NULL COMMENT '检验的执行医师',\r\n" + 
        		"  `lab_performer_dtime` datetime NULL COMMENT '检验的执行时间',\r\n" + 
        		"  `test_technician_code` varchar(30) NULL COMMENT '检验技师代码',\r\n" + 
        		"  `test_technician_name` varchar(40) NULL COMMENT '检验技师签名',\r\n" + 
        		"  `recognition` varchar(1) NULL COMMENT '可互认标志',\r\n" + 
        		"  `diagnosis_Code` varchar(20) NULL COMMENT '疾病诊断代码',\r\n" + 
        		"  `diagnosis_Name` varchar(200) NULL COMMENT '疾病诊断名称',\r\n" + 
        		"  `diag_org_name` varchar(50) NULL COMMENT '诊断机构名称',\r\n" + 
        		"  `diag_date` datetime NULL COMMENT '诊断日期',\r\n" + 
        		"  `blood_date` datetime NULL COMMENT '采样时间',\r\n" + 
        		"  `specimen_receive_time` datetime NULL COMMENT '接收时间',\r\n" + 
        		"  `lab_method_name` varchar(2000) NULL COMMENT '检验方法名称',\r\n" + 
        		"  `lab_instrument` varchar(200) NULL COMMENT '检验仪器',\r\n" + 
        		"  `lab_purpose` varchar(2000) NULL COMMENT '检验目的',\r\n" + 
        		"  `specimen_collect_operator_code` varchar(30) NULL COMMENT '采样人代码',\r\n" + 
        		"  `specimen_collect_operator` varchar(40) NULL COMMENT '采样人',\r\n" + 
        		"  `specimen_accept_operator_code` varchar(30) NULL COMMENT '接收人代码',\r\n" + 
        		"  `specimen_accept_operator` varchar(40) NULL COMMENT '接收人',\r\n" + 
        		"  `barcode_no` varchar(128) NULL COMMENT '条形码',\r\n" + 
        		"  `print_time` datetime NULL COMMENT '打印时间',\r\n" + 
        		"  `print_operator` varchar(128) NULL COMMENT '打印人',\r\n" + 
        		"  `test_report_results` varchar(500) NULL COMMENT '检验报告结果',\r\n" + 
        		"  `test_report_remark` varchar(1000) NULL COMMENT '检验报告备注',\r\n" + 
        		"  `test_report_date` datetime NULL COMMENT '检验报告日期',\r\n" + 
        		"  `state` int NULL COMMENT '状态',\r\n" + 
        		"  `deleted` boolean NULL COMMENT '删除标识',\r\n" + 
        		"  `create_by` bigint NULL COMMENT '创建人',\r\n" + 
        		"  `create_time` datetime NULL COMMENT '创建时间',\r\n" + 
        		"  `update_by` bigint NULL COMMENT '修改人',\r\n" + 
        		"  `update_time` datetime  NOT NULL COMMENT '修改时间',\r\n" + 
        		"  `business_time` datetime  NOT NULL COMMENT '业务时间'\r\n" + 
        		") ENGINE=OLAP \r\n" + 
        		"UNIQUE KEY(`id`) \r\n" + 
        		"COMMENT '检验报告主表' \r\n" + 
        		"DISTRIBUTED BY HASH(`id`) BUCKETS 10 \r\n" + 
        		"PROPERTIES ( \r\n" + 
        		"\"replication_allocation\" = \"tag.location.default: 1\", \r\n" + 
        		"\"is_being_synced\" = \"false\", \r\n" + 
        		"\"storage_format\" = \"V2\", \r\n" + 
        		"\"light_schema_change\" = \"true\", \r\n" + 
        		"\"disable_auto_compaction\" = \"false\", \r\n" + 
        		"\"enable_single_replica_compaction\" = \"false\");\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"CREATE TABLE IF NOT EXISTS `ygt_db`.`lab_subitem` (\r\n" + 
        		"  `id` bigint  NOT NULL COMMENT 'ID',\r\n" + 
        		"  `org_id` bigint NULL COMMENT '机构标识',\r\n" + 
        		"  `org_code` varchar(50)  NOT NULL COMMENT '机构编码',\r\n" + 
        		"  `org_name` varchar(50)  NOT NULL COMMENT '机构名称',\r\n" + 
        		"  `health_card_no` varchar(36) NULL COMMENT '居民健康卡号',\r\n" + 
        		"  `id_type_code` varchar(2)  NOT NULL COMMENT '身份证件类别代码',\r\n" + 
        		"  `id_type_name` varchar(50) NULL COMMENT '身份证件类别名称',\r\n" + 
        		"  `id_no` varchar(128)  NOT NULL COMMENT '身份证件号码',\r\n" + 
        		"  `order_id` bigint NULL COMMENT '医嘱标识',\r\n" + 
        		"  `event_type` smallint NULL COMMENT '事件类型',\r\n" + 
        		"  `event_type_name` varchar(10) NULL COMMENT '时间类型名称',\r\n" + 
        		"  `event_no` varchar(128)  NOT NULL COMMENT '事件号',\r\n" + 
        		"  `report_form_no` varchar(128)  NOT NULL COMMENT '所属报告单号',\r\n" + 
        		"  `serial_no` varchar(128)  NOT NULL COMMENT '所属子项序号',\r\n" + 
        		"  `class_code` varchar(128) NULL COMMENT '子项的LOINC编码',\r\n" + 
        		"  `class_name` varchar(128)  NOT NULL COMMENT '子项项目名称',\r\n" + 
        		"  `class_en_code` varchar(20) NULL COMMENT '子项目英文缩写',\r\n" + 
        		"  `result_type` varchar(128)  NOT NULL COMMENT '结果类型',\r\n" + 
        		"  `result_type_name` varchar(128) NULL COMMENT '结果类型名称',\r\n" + 
        		"  `test_result_code` varchar(2) NULL COMMENT '检验结果代码',\r\n" + 
        		"  `test_result_name` varchar(10) NULL COMMENT '检验结果名称',\r\n" + 
        		"  `test_quantitative_result` decimal(12,4) NULL COMMENT '检验定量结果',\r\n" + 
        		"  `test_qualitative_result` varchar(100) NULL COMMENT '检验定性结果',\r\n" + 
        		"  `result_value` varchar(512)  NOT NULL COMMENT '结果值',\r\n" + 
        		"  `result_unit` varchar(20)  NOT NULL COMMENT '单位',\r\n" + 
        		"  `norm_lower_limit` varchar(128)  NOT NULL COMMENT '正常参考值下限',\r\n" + 
        		"  `norm_upper_limit` varchar(128)  NOT NULL COMMENT '正常参考值上限',\r\n" + 
        		"  `norm_value_notes` varchar(4000) NULL COMMENT '参考值备注',\r\n" + 
        		"  `result_interpre` varchar(2) NULL COMMENT '结果值的解释代码',\r\n" + 
        		"  `result_interpre_name` varchar(10) NULL COMMENT '结果值的解释描述',\r\n" + 
        		"  `effective_dtime` datetime NULL COMMENT '该项的创建时间',\r\n" + 
        		"  `examine_way` varchar(512) NULL COMMENT '检验方法描述',\r\n" + 
        		"  `recognition` varchar(1) NULL COMMENT '可互认标志',\r\n" + 
        		"  `anomaly_mark` varchar(1) NULL COMMENT '检验结果是否异常',\r\n" + 
        		"  `critical_upper_limit` varchar(16) NULL COMMENT '危急重值上限',\r\n" + 
        		"  `critical_lower_limit` varchar(16) NULL COMMENT '危急重值下限',\r\n" + 
        		"  `clinical_significance` varchar(512) NULL COMMENT '临床意义',\r\n" + 
        		"  `state` int NULL COMMENT '状态',\r\n" + 
        		"  `deleted` boolean NULL COMMENT '删除标识',\r\n" + 
        		"  `create_by` bigint NULL COMMENT '创建人',\r\n" + 
        		"  `create_time` datetime NULL COMMENT '创建时间',\r\n" + 
        		"  `update_by` bigint NULL COMMENT '修改人',\r\n" + 
        		"  `update_time` datetime  NOT NULL COMMENT '修改时间',\r\n" + 
        		"  `business_time` datetime  NOT NULL COMMENT '业务时间'\r\n" + 
        		") ENGINE=OLAP \r\n" + 
        		"UNIQUE KEY(`id`) \r\n" + 
        		"COMMENT '检验报告子表' \r\n" + 
        		"DISTRIBUTED BY HASH(`id`) BUCKETS 10 \r\n" + 
        		"PROPERTIES ( \r\n" + 
        		"\"replication_allocation\" = \"tag.location.default: 1\", \r\n" + 
        		"\"is_being_synced\" = \"false\", \r\n" + 
        		"\"storage_format\" = \"V2\", \r\n" + 
        		"\"light_schema_change\" = \"true\", \r\n" + 
        		"\"disable_auto_compaction\" = \"false\", \r\n" + 
        		"\"enable_single_replica_compaction\" = \"false\");\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"CREATE TABLE IF NOT EXISTS `ygt_db`.`lab_drug_sen` (\r\n" + 
        		"  `id` bigint  NOT NULL COMMENT 'ID',\r\n" + 
        		"  `org_id` bigint NULL COMMENT '机构标识',\r\n" + 
        		"  `org_code` varchar(50)  NOT NULL COMMENT '机构编码',\r\n" + 
        		"  `org_name` varchar(50)  NOT NULL COMMENT '机构名称',\r\n" + 
        		"  `health_card_no` varchar(36) NULL COMMENT '居民健康卡号',\r\n" + 
        		"  `id_type_code` varchar(2)  NOT NULL COMMENT '身份证件类别代码',\r\n" + 
        		"  `id_type_name` varchar(50) NULL COMMENT '身份证件类别名称',\r\n" + 
        		"  `id_no` varchar(128)  NOT NULL COMMENT '身份证件号码',\r\n" + 
        		"  `event_type` smallint NULL COMMENT '事件类型',\r\n" + 
        		"  `event_type_name` varchar(10) NULL COMMENT '时间类型名称',\r\n" + 
        		"  `event_no` varchar(128) NULL COMMENT '事件号',\r\n" + 
        		"  `report_form_no` varchar(128) NULL COMMENT '所属报告单号',\r\n" + 
        		"  `serial_no` varchar(128) NULL COMMENT '所属子项序号',\r\n" + 
        		"  `drug_result_id` varchar(128) NULL COMMENT '药敏结果ID',\r\n" + 
        		"  `drug_sensitivity_code` varchar(1) NULL COMMENT '药敏结果代码',\r\n" + 
        		"  `drug_sensitivity_name` varchar(10) NULL COMMENT '药敏结果名称',\r\n" + 
        		"  `drug_result` varchar(1024) NULL COMMENT '药敏结果描述',\r\n" + 
        		"  `check_result` varchar(40) NULL COMMENT '检测结果名称',\r\n" + 
        		"  `piece_drug` varchar(128) NULL COMMENT '纸片含药量',\r\n" + 
        		"  `bacsta_concen` varchar(128) NULL COMMENT '抑菌浓度',\r\n" + 
        		"  `bacsta_diameter` varchar(128) NULL COMMENT '抑菌环直径',\r\n" + 
        		"  `antibiotics_code` varchar(128) NULL COMMENT '抗生素代码',\r\n" + 
        		"  `antibiotics_name` varchar(128) NULL COMMENT '抗生素名称',\r\n" + 
        		"  `norm_upper_limit` decimal(14,4) NULL COMMENT '正常值参考上限',\r\n" + 
        		"  `norm_lower_limit` decimal(14,4) NULL COMMENT '正常值参考下限',\r\n" + 
        		"  `critical_upper_limit` decimal(14,4) NULL COMMENT '危急重值上限',\r\n" + 
        		"  `critical_lower_limit` decimal(14,4) NULL COMMENT '危急重值下限',\r\n" + 
        		"  `recorder_ic_no` varchar(18) NULL COMMENT '记录人身份证号',\r\n" + 
        		"  `recorder_name` varchar(40) NULL COMMENT '记录人姓名',\r\n" + 
        		"  `recorder_code` varchar(30) NULL COMMENT '记录人代码',\r\n" + 
        		"  `print_order` smallint NULL COMMENT '打印序号',\r\n" + 
        		"  `state` int NULL COMMENT '状态',\r\n" + 
        		"  `deleted` boolean NULL COMMENT '删除标识',\r\n" + 
        		"  `create_by` bigint NULL COMMENT '创建人',\r\n" + 
        		"  `create_time` datetime NULL COMMENT '创建时间',\r\n" + 
        		"  `update_by` bigint NULL COMMENT '修改人',\r\n" + 
        		"  `update_time` datetime  NOT NULL COMMENT '修改时间',\r\n" + 
        		"  `business_time` datetime  NOT NULL COMMENT '业务时间'\r\n" + 
        		") ENGINE=OLAP \r\n" + 
        		"UNIQUE KEY(`id`) \r\n" + 
        		"COMMENT '实验室检验药敏结果' \r\n" + 
        		"DISTRIBUTED BY HASH(`id`) BUCKETS 10 \r\n" + 
        		"PROPERTIES ( \r\n" + 
        		"\"replication_allocation\" = \"tag.location.default: 1\", \r\n" + 
        		"\"is_being_synced\" = \"false\", \r\n" + 
        		"\"storage_format\" = \"V2\", \r\n" + 
        		"\"light_schema_change\" = \"true\", \r\n" + 
        		"\"disable_auto_compaction\" = \"false\", \r\n" + 
        		"\"enable_single_replica_compaction\" = \"false\");\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"CREATE TABLE IF NOT EXISTS `ygt_db`.`healthexam_reg` (\r\n" + 
        		"  `id` bigint  NOT NULL COMMENT 'ID',\r\n" + 
        		"  `org_id` bigint NULL COMMENT '机构标识',\r\n" + 
        		"  `org_code` varchar(50)  NOT NULL COMMENT '机构编码',\r\n" + 
        		"  `org_name` varchar(50)  NOT NULL COMMENT '机构名称',\r\n" + 
        		"  `patient_id` varchar(128) NULL COMMENT '患者ID',\r\n" + 
        		"  `event_type` smallint NULL COMMENT '事件类型',\r\n" + 
        		"  `event_type_name` varchar(10) NULL COMMENT '时间类型名称',\r\n" + 
        		"  `event_no` varchar(128) NULL COMMENT '事件号',\r\n" + 
        		"  `health_exam_form_no` varchar(128) NULL COMMENT '健康体检表编号',\r\n" + 
        		"  `health_record_no` varchar(17) NULL COMMENT '城乡居民健康档案编号',\r\n" + 
        		"  `health_card_no` varchar(36) NULL COMMENT '居民健康卡号',\r\n" + 
        		"  `id_type_code` varchar(2)  NOT NULL COMMENT '身份证件类别代码',\r\n" + 
        		"  `id_type_name` varchar(50) NULL COMMENT '身份证件类别名称',\r\n" + 
        		"  `id_no` varchar(128)  NOT NULL COMMENT '身份证件号码',\r\n" + 
        		"  `start_dtime` datetime NULL COMMENT '体检开始时间',\r\n" + 
        		"  `exam_end_date` datetime NULL COMMENT '体检结束日期',\r\n" + 
        		"  `retrieve_date` datetime NULL COMMENT '归档检索日期',\r\n" + 
        		"  `total_fee` decimal(12,4) NULL COMMENT '总费用',\r\n" + 
        		"  `icd_code` varchar(24) NULL COMMENT '主诊断代码',\r\n" + 
        		"  `diagnosis_name` varchar(200) NULL COMMENT '主诊断名称',\r\n" + 
        		"  `report_title` varchar(256) NULL COMMENT '报告的标题',\r\n" + 
        		"  `effective_dtime` datetime NULL COMMENT '文档创建时间',\r\n" + 
        		"  `name` varchar(40) NULL COMMENT '病人的姓名',\r\n" + 
        		"  `sex_code` varchar(1)  NOT NULL COMMENT '性别代码',\r\n" + 
        		"  `gender` varchar(10) NULL COMMENT '性别',\r\n" + 
        		"  `birth_date` datetime NULL COMMENT '出生日期',\r\n" + 
        		"  `age_year` smallint NULL COMMENT '年龄(岁)',\r\n" + 
        		"  `age_month` varchar(8) NULL COMMENT '年龄(月)',\r\n" + 
        		"  `age` smallint NULL COMMENT '年龄',\r\n" + 
        		"  `age_unit_code` varchar(1) NULL COMMENT '年龄单位代码',\r\n" + 
        		"  `age_unit_name` varchar(20) NULL COMMENT '年龄单位名称',\r\n" + 
        		"  `nationality_code` varchar(2) NULL COMMENT '民族代码',\r\n" + 
        		"  `nationality` varchar(10) NULL COMMENT '民族',\r\n" + 
        		"  `abo_code` varchar(1) NULL COMMENT 'ABO血型代码',\r\n" + 
        		"  `abo_name` varchar(10) NULL COMMENT 'ABO血型名称',\r\n" + 
        		"  `rh_code` varchar(1) NULL COMMENT 'Rh血型代码',\r\n" + 
        		"  `rh_name` varchar(10) NULL COMMENT 'Rh血型名称',\r\n" + 
        		"  `height` smallint NULL COMMENT '身高',\r\n" + 
        		"  `weight` decimal(5,2) NULL COMMENT '体重',\r\n" + 
        		"  `birth_place` varchar(200) NULL COMMENT '出生地',\r\n" + 
        		"  `province` varchar(70) NULL COMMENT '省',\r\n" + 
        		"  `city` varchar(70) NULL COMMENT '市',\r\n" + 
        		"  `county` varchar(70) NULL COMMENT '县',\r\n" + 
        		"  `town` varchar(70) NULL COMMENT '乡',\r\n" + 
        		"  `village` varchar(70) NULL COMMENT '村',\r\n" + 
        		"  `house_no` varchar(70) NULL COMMENT '门牌号码',\r\n" + 
        		"  `tel_no` varchar(16) NULL COMMENT '电话',\r\n" + 
        		"  `address` varchar(200) NULL COMMENT '现详细住址',\r\n" + 
        		"  `employer_name` varchar(70) NULL COMMENT '单位名称',\r\n" + 
        		"  `occupation_code` varchar(30) NULL COMMENT '职业类别代码',\r\n" + 
        		"  `occupation_name` varchar(200) NULL COMMENT '职业类别',\r\n" + 
        		"  `smoke` varchar(1) NULL COMMENT '是否抽烟',\r\n" + 
        		"  `smoke_year` varchar(4) NULL COMMENT '抽烟年数',\r\n" + 
        		"  `drink` varchar(1) NULL COMMENT '是否饮酒',\r\n" + 
        		"  `drink_year` varchar(4) NULL COMMENT '饮酒年数',\r\n" + 
        		"  `marriage_code` varchar(2) NULL COMMENT '婚姻状况代码',\r\n" + 
        		"  `marriage` varchar(10) NULL COMMENT '婚姻状况',\r\n" + 
        		"  `exam_summary` varchar(4000) NULL COMMENT '总检结论',\r\n" + 
        		"  `prevent` varchar(2000) NULL COMMENT '防治意见',\r\n" + 
        		"  `exam_type` varchar(3) NULL COMMENT '体检目的类型代码',\r\n" + 
        		"  `exam_name` varchar(20) NULL COMMENT '体检目的类型名称',\r\n" + 
        		"  `exam_result_code` varchar(1) NULL COMMENT '体检是否合格结论代码',\r\n" + 
        		"  `exam_result_name` varchar(10) NULL COMMENT '体检是否合格结论名称',\r\n" + 
        		"  `exam_result` varchar(4000) NULL COMMENT '体检是否合格结论',\r\n" + 
        		"  `exam_chief_doctor_code` varchar(30) NULL COMMENT '总检医生代码',\r\n" + 
        		"  `exam_chief_doctor` varchar(40) NULL COMMENT '总检医生',\r\n" + 
        		"  `health_guide` varchar(4000) NULL COMMENT '健康指南',\r\n" + 
        		"  `notes` varchar(4000) NULL COMMENT '备注',\r\n" + 
        		"  `diag_explan` varchar(4000) NULL COMMENT '疾病解析',\r\n" + 
        		"  `food_guidance` varchar(4000) NULL COMMENT '饮食建议',\r\n" + 
        		"  `summarize_time` datetime NULL COMMENT '总检时间',\r\n" + 
        		"  `check_doctor_code` varchar(30) NULL COMMENT '审核医生代码',\r\n" + 
        		"  `check_doctor` varchar(40) NULL COMMENT '审核医生',\r\n" + 
        		"  `check_doctor_ic_no` varchar(18) NULL COMMENT '审核医生身份证号',\r\n" + 
        		"  `check_time` datetime NULL COMMENT '审核时间',\r\n" + 
        		"  `print_time` datetime NULL COMMENT '打印时间',\r\n" + 
        		"  `state` int NULL COMMENT '状态',\r\n" + 
        		"  `deleted` boolean NULL COMMENT '删除标识',\r\n" + 
        		"  `create_by` bigint NULL COMMENT '创建人',\r\n" + 
        		"  `create_time` datetime NULL COMMENT '创建时间',\r\n" + 
        		"  `update_by` bigint NULL COMMENT '修改人',\r\n" + 
        		"  `update_time` datetime  NOT NULL COMMENT '修改时间',\r\n" + 
        		"  `business_time` datetime  NOT NULL COMMENT '业务时间'\r\n" + 
        		") ENGINE=OLAP \r\n" + 
        		"UNIQUE KEY(`id`) \r\n" + 
        		"COMMENT '健康体检-登记表' \r\n" + 
        		"DISTRIBUTED BY HASH(`id`) BUCKETS 10 \r\n" + 
        		"PROPERTIES ( \r\n" + 
        		"\"replication_allocation\" = \"tag.location.default: 1\", \r\n" + 
        		"\"is_being_synced\" = \"false\", \r\n" + 
        		"\"storage_format\" = \"V2\", \r\n" + 
        		"\"light_schema_change\" = \"true\", \r\n" + 
        		"\"disable_auto_compaction\" = \"false\", \r\n" + 
        		"\"enable_single_replica_compaction\" = \"false\");\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"CREATE TABLE IF NOT EXISTS `ygt_db`.`healthexam_catalog` (\r\n" + 
        		"  `id` bigint  NOT NULL COMMENT 'ID',\r\n" + 
        		"  `org_id` bigint NULL COMMENT '机构标识',\r\n" + 
        		"  `org_code` varchar(50)  NOT NULL COMMENT '机构编码',\r\n" + 
        		"  `org_name` varchar(50)  NOT NULL COMMENT '机构名称',\r\n" + 
        		"  `id_type_code` varchar(2)  NOT NULL COMMENT '身份证件类别代码',\r\n" + 
        		"  `id_type_name` varchar(50) NULL COMMENT '身份证件类别名称',\r\n" + 
        		"  `id_no` varchar(128)  NOT NULL COMMENT '身份证件号码',\r\n" + 
        		"  `event_type` smallint NULL COMMENT '事件类型',\r\n" + 
        		"  `event_type_name` varchar(10) NULL COMMENT '时间类型名称',\r\n" + 
        		"  `event_no` varchar(128) NULL COMMENT '事件号',\r\n" + 
        		"  `health_exam_form_no` varchar(128) NULL COMMENT '健康体检表编号',\r\n" + 
        		"  `catalog_id` varchar(2) NULL COMMENT '体检类别编码',\r\n" + 
        		"  `catalog_name` varchar(20) NULL COMMENT '体检类别名称',\r\n" + 
        		"  `performer_dept_name` varchar(40) NULL COMMENT '执行科室名称',\r\n" + 
        		"  `performer_dept_code` varchar(50) NULL COMMENT '执行科室代码',\r\n" + 
        		"  `performer_local_name` varchar(40) NULL COMMENT '执行科室院内名称',\r\n" + 
        		"  `performer_doctor_code` varchar(30) NULL COMMENT '执行医生代码',\r\n" + 
        		"  `performer_doctor` varchar(40) NULL COMMENT '执行医生',\r\n" + 
        		"  `perform_dtime` datetime NULL COMMENT '执行时间',\r\n" + 
        		"  `summary` varchar(4000) NULL COMMENT '小结',\r\n" + 
        		"  `state` int NULL COMMENT '状态',\r\n" + 
        		"  `deleted` boolean NULL COMMENT '删除标识',\r\n" + 
        		"  `create_by` bigint NULL COMMENT '创建人',\r\n" + 
        		"  `create_time` datetime NULL COMMENT '创建时间',\r\n" + 
        		"  `update_by` bigint NULL COMMENT '修改人',\r\n" + 
        		"  `update_time` datetime  NOT NULL COMMENT '修改时间',\r\n" + 
        		"  `business_time` datetime  NOT NULL COMMENT '业务时间'\r\n" + 
        		") ENGINE=OLAP \r\n" + 
        		"UNIQUE KEY(`id`) \r\n" + 
        		"COMMENT '健康体检-科目表' \r\n" + 
        		"DISTRIBUTED BY HASH(`id`) BUCKETS 10 \r\n" + 
        		"PROPERTIES ( \r\n" + 
        		"\"replication_allocation\" = \"tag.location.default: 1\", \r\n" + 
        		"\"is_being_synced\" = \"false\", \r\n" + 
        		"\"storage_format\" = \"V2\", \r\n" + 
        		"\"light_schema_change\" = \"true\", \r\n" + 
        		"\"disable_auto_compaction\" = \"false\", \r\n" + 
        		"\"enable_single_replica_compaction\" = \"false\");\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"CREATE TABLE IF NOT EXISTS `ygt_db`.`healthexam_subitem` (\r\n" + 
        		"  `id` bigint  NOT NULL COMMENT 'ID',\r\n" + 
        		"  `org_id` bigint NULL COMMENT '机构标识',\r\n" + 
        		"  `org_code` varchar(50)  NOT NULL COMMENT '机构编码',\r\n" + 
        		"  `org_name` varchar(50)  NOT NULL COMMENT '机构名称',\r\n" + 
        		"  `event_type` smallint NULL COMMENT '事件类型',\r\n" + 
        		"  `event_type_name` varchar(10) NULL COMMENT '时间类型名称',\r\n" + 
        		"  `event_no` varchar(128) NULL COMMENT '事件号',\r\n" + 
        		"  `id_type_code` varchar(2)  NOT NULL COMMENT '身份证件类别代码',\r\n" + 
        		"  `id_type_name` varchar(50) NULL COMMENT '身份证件类别名称',\r\n" + 
        		"  `id_no` varchar(128)  NOT NULL COMMENT '身份证件号码',\r\n" + 
        		"  `health_exam_form_no` varchar(128) NULL COMMENT '健康体检表编号',\r\n" + 
        		"  `catalog_id` varchar(2) NULL COMMENT '体检类别编码',\r\n" + 
        		"  `catalog_name` varchar(20) NULL COMMENT '体检类别名称',\r\n" + 
        		"  `serial_no` varchar(128) NULL COMMENT '子项序号',\r\n" + 
        		"  `class_code` varchar(128) NULL COMMENT '体检项目编码',\r\n" + 
        		"  `class_name` varchar(128) NULL COMMENT '体检项目名称',\r\n" + 
        		"  `result_type_code` varchar(2) NULL COMMENT '结果类型代码',\r\n" + 
        		"  `result_type_name` varchar(10) NULL COMMENT '结果类型名称',\r\n" + 
        		"  `result_type_descr` varchar(128) NULL COMMENT '结果类型描述',\r\n" + 
        		"  `result_code` varchar(128) NULL COMMENT '结果编码',\r\n" + 
        		"  `result_value` varchar(512) NULL COMMENT '结果值',\r\n" + 
        		"  `result_unit` varchar(20) NULL COMMENT '单位',\r\n" + 
        		"  `norm_lower_limit` varchar(128) NULL COMMENT '正常参考值下限',\r\n" + 
        		"  `norm_upper_limit` varchar(128) NULL COMMENT '正常参考值上限',\r\n" + 
        		"  `norm_value_notes` varchar(4000) NULL COMMENT '参考值备注',\r\n" + 
        		"  `result_interpre` varchar(2) NULL COMMENT '结果值的解释代码',\r\n" + 
        		"  `result_interpre_name` varchar(10) NULL COMMENT '结果值的解释名称',\r\n" + 
        		"  `result_interpre_descr` varchar(128) NULL COMMENT '结果值的解释描述',\r\n" + 
        		"  `effective_dtime` datetime NULL COMMENT '该项的创建时间',\r\n" + 
        		"  `state` int NULL COMMENT '状态',\r\n" + 
        		"  `deleted` boolean NULL COMMENT '删除标识',\r\n" + 
        		"  `create_by` bigint NULL COMMENT '创建人',\r\n" + 
        		"  `create_time` datetime NULL COMMENT '创建时间',\r\n" + 
        		"  `update_by` bigint NULL COMMENT '修改人',\r\n" + 
        		"  `update_time` datetime  NOT NULL COMMENT '修改时间',\r\n" + 
        		"  `business_time` datetime  NOT NULL COMMENT '业务时间'\r\n" + 
        		") ENGINE=OLAP \r\n" + 
        		"UNIQUE KEY(`id`) \r\n" + 
        		"COMMENT '健康体检-项目子表' \r\n" + 
        		"DISTRIBUTED BY HASH(`id`) BUCKETS 10 \r\n" + 
        		"PROPERTIES ( \r\n" + 
        		"\"replication_allocation\" = \"tag.location.default: 1\", \r\n" + 
        		"\"is_being_synced\" = \"false\", \r\n" + 
        		"\"storage_format\" = \"V2\", \r\n" + 
        		"\"light_schema_change\" = \"true\", \r\n" + 
        		"\"disable_auto_compaction\" = \"false\", \r\n" + 
        		"\"enable_single_replica_compaction\" = \"false\");\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"CREATE TABLE IF NOT EXISTS `ygt_db`.`gh_drug_list` (\r\n" + 
        		"  `id` bigint  NOT NULL COMMENT 'ID',\r\n" + 
        		"  `org_id` bigint NULL COMMENT '机构标识',\r\n" + 
        		"  `org_code` varchar(50)  NOT NULL COMMENT '机构编码',\r\n" + 
        		"  `org_name` varchar(50)  NOT NULL COMMENT '机构名称',\r\n" + 
        		"  `hos_drug_id` varchar(30)  NOT NULL COMMENT '院内药品唯一码',\r\n" + 
        		"  `szqh` int  NOT NULL COMMENT '行政区划代码',\r\n" + 
        		"  `szqh_name` varchar(128)  NOT NULL COMMENT '行政区划名称',\r\n" + 
        		"  `hospital_code` varchar(10)  NOT NULL COMMENT '医疗机构组织类别代码',\r\n" + 
        		"  `hospital_name` varchar(128)  NOT NULL COMMENT '医疗机构组织类别名称',\r\n" + 
        		"  `serial_num` bigint  NOT NULL COMMENT '流水号',\r\n" + 
        		"  `ypid` varchar(12)  NOT NULL COMMENT '国家药管平台药品编码',\r\n" + 
        		"  `ypid_name` varchar(128)  NOT NULL COMMENT '国家药管平台药品名称',\r\n" + 
        		"  `pr_drug_id` varchar(30) NULL COMMENT '省级药品集中采购平台药品编码',\r\n" + 
        		"  `pr_drug_name` varchar(128) NULL COMMENT '省级药品集中采购平台药品名称',\r\n" + 
        		"  `approval_num` varchar(100) NULL COMMENT '批准文号',\r\n" + 
        		"  `drug_name` varchar(100) NULL COMMENT '品种通用名',\r\n" + 
        		"  `product_name` varchar(200)  NOT NULL COMMENT '药品通用名',\r\n" + 
        		"  `trade_name` varchar(100) NULL COMMENT '商品名',\r\n" + 
        		"  `trade_eng_name` varchar(200) NULL COMMENT '商品名（英文）',\r\n" + 
        		"  `manufacturer` varchar(200) NULL COMMENT '生产企业',\r\n" + 
        		"  `drug_form` varchar(50) NULL COMMENT '剂型名称',\r\n" + 
        		"  `drug_spec` varchar(100) NULL COMMENT '制剂规格',\r\n" + 
        		"  `dosage_unit` varchar(50)  NOT NULL COMMENT '制剂单位',\r\n" + 
        		"  `pack_unit` varchar(50)  NOT NULL COMMENT '最小销售包装单位',\r\n" + 
        		"  `drug_factor` decimal(8,2)  NOT NULL COMMENT '转换系数',\r\n" + 
        		"  `unity_purchase_flag` varchar(1)  NOT NULL COMMENT '是否网上集中采购药品',\r\n" + 
        		"  `base_flag` varchar(1)  NOT NULL COMMENT '是否基本药物',\r\n" + 
        		"  `uniformity_flag` varchar(1)  NOT NULL COMMENT '是否通过一致性评价',\r\n" + 
        		"  `organization_name` varchar(64)  NOT NULL COMMENT '组织机构名称',\r\n" + 
        		"  `state` int NULL COMMENT '状态',\r\n" + 
        		"  `deleted` boolean NULL COMMENT '删除标识',\r\n" + 
        		"  `create_by` bigint NULL COMMENT '创建人',\r\n" + 
        		"  `create_time` datetime NULL COMMENT '创建时间',\r\n" + 
        		"  `update_by` bigint NULL COMMENT '修改人',\r\n" + 
        		"  `update_time` datetime  NOT NULL COMMENT '修改时间',\r\n" + 
        		"  `business_time` datetime  NOT NULL COMMENT '业务时间'\r\n" + 
        		") ENGINE=OLAP \r\n" + 
        		"UNIQUE KEY(`id`) \r\n" + 
        		"COMMENT '医疗卫生机构药品目录' \r\n" + 
        		"DISTRIBUTED BY HASH(`id`) BUCKETS 10 \r\n" + 
        		"PROPERTIES ( \r\n" + 
        		"\"replication_allocation\" = \"tag.location.default: 1\", \r\n" + 
        		"\"is_being_synced\" = \"false\", \r\n" + 
        		"\"storage_format\" = \"V2\", \r\n" + 
        		"\"light_schema_change\" = \"true\", \r\n" + 
        		"\"disable_auto_compaction\" = \"false\", \r\n" + 
        		"\"enable_single_replica_compaction\" = \"false\");\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"CREATE TABLE IF NOT EXISTS `ygt_db`.`gh_drug_inout_info` (\r\n" + 
        		"  `id` bigint  NOT NULL COMMENT 'ID',\r\n" + 
        		"  `org_id` bigint NULL COMMENT '机构标识',\r\n" + 
        		"  `org_code` varchar(50)  NOT NULL COMMENT '机构编码',\r\n" + 
        		"  `org_name` varchar(50)  NOT NULL COMMENT '机构名称',\r\n" + 
        		"  `hos_drug_id` varchar(30)  NOT NULL COMMENT '院内药品唯一码',\r\n" + 
        		"  `szqh` int  NOT NULL COMMENT '行政区划代码',\r\n" + 
        		"  `szqh_name` varchar(128)  NOT NULL COMMENT '行政区划名称',\r\n" + 
        		"  `out_in_date` varchar(8)  NOT NULL COMMENT '出入库时间',\r\n" + 
        		"  `hospital_code` varchar(10)  NOT NULL COMMENT '医疗机构代码',\r\n" + 
        		"  `serial_num` bigint  NOT NULL COMMENT '流水号',\r\n" + 
        		"  `ypid` varchar(12)  NOT NULL COMMENT '国家药管平台药品编码',\r\n" + 
        		"  `ypid_name` varchar(128)  NOT NULL COMMENT '国家药管平台药品名称',\r\n" + 
        		"  `pr_drug_id` varchar(30)  NOT NULL COMMENT '省级药品集中采购平台药品编码',\r\n" + 
        		"  `pr_drug_name` varchar(128)  NOT NULL COMMENT '省级药品集中采购平台药品名称',\r\n" + 
        		"  `product_name` varchar(200)  NOT NULL COMMENT '药品通用名',\r\n" + 
        		"  `in_pack_quantity` bigint  NOT NULL COMMENT '入库数量（最小销售包装单位）',\r\n" + 
        		"  `in_dosag_quantity` bigint  NOT NULL COMMENT '入库数量（最小制剂单位）',\r\n" + 
        		"  `in_pack_price` decimal(10,2)  NOT NULL COMMENT '入库价格(最小销售包装单位)',\r\n" + 
        		"  `in_dosage_price` decimal(10,2)  NOT NULL COMMENT '入库价格(最小制剂单位)',\r\n" + 
        		"  `out_pack_quantity` bigint  NOT NULL COMMENT '出库数量（最小销售包装单位）',\r\n" + 
        		"  `out_dosage_quantity` bigint  NOT NULL COMMENT '出库数量（最小制剂单位）',\r\n" + 
        		"  `organization_name` varchar(64)  NOT NULL COMMENT '组织机构名称',\r\n" + 
        		"  `state` int NULL COMMENT '状态',\r\n" + 
        		"  `deleted` boolean NULL COMMENT '删除标识',\r\n" + 
        		"  `create_by` bigint NULL COMMENT '创建人',\r\n" + 
        		"  `create_time` datetime NULL COMMENT '创建时间',\r\n" + 
        		"  `update_by` bigint NULL COMMENT '修改人',\r\n" + 
        		"  `update_time` datetime  NOT NULL COMMENT '修改时间',\r\n" + 
        		"  `business_time` datetime  NOT NULL COMMENT '业务时间'\r\n" + 
        		") ENGINE=OLAP \r\n" + 
        		"UNIQUE KEY(`id`) \r\n" + 
        		"COMMENT '医疗卫生机构药品出入库' \r\n" + 
        		"DISTRIBUTED BY HASH(`id`) BUCKETS 10 \r\n" + 
        		"PROPERTIES ( \r\n" + 
        		"\"replication_allocation\" = \"tag.location.default: 1\", \r\n" + 
        		"\"is_being_synced\" = \"false\", \r\n" + 
        		"\"storage_format\" = \"V2\", \r\n" + 
        		"\"light_schema_change\" = \"true\", \r\n" + 
        		"\"disable_auto_compaction\" = \"false\", \r\n" + 
        		"\"enable_single_replica_compaction\" = \"false\");\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"CREATE TABLE IF NOT EXISTS `ygt_db`.`gh_drug_purchase_info` (\r\n" + 
        		"  `id` bigint  NOT NULL COMMENT 'ID',\r\n" + 
        		"  `org_id` bigint NULL COMMENT '机构标识',\r\n" + 
        		"  `org_code` varchar(50)  NOT NULL COMMENT '机构编码',\r\n" + 
        		"  `org_name` varchar(50)  NOT NULL COMMENT '机构名称',\r\n" + 
        		"  `order_date` varchar(8)  NOT NULL COMMENT '药品订单日期',\r\n" + 
        		"  `szqh` int  NOT NULL COMMENT '行政区划代码',\r\n" + 
        		"  `szqh_name` varchar(128)  NOT NULL COMMENT '行政区划名称',\r\n" + 
        		"  `hos_drug_id` varchar(30)  NOT NULL COMMENT '院内药品唯一码',\r\n" + 
        		"  `serial_num` bigint  NOT NULL COMMENT '流水号',\r\n" + 
        		"  `ypid` varchar(12)  NOT NULL COMMENT '国家药管平台药品编码',\r\n" + 
        		"  `ypid_name` varchar(128)  NOT NULL COMMENT '国家药管平台药品名称',\r\n" + 
        		"  `pr_drug_id` varchar(30) NULL COMMENT '省级药品集中采购平台药品编码',\r\n" + 
        		"  `pr_drug_name` varchar(128) NULL COMMENT '省级药品集中采购平台药品名称',\r\n" + 
        		"  `product_name` varchar(200)  NOT NULL COMMENT '药品通用名',\r\n" + 
        		"  `pack_price` decimal(10,2)  NOT NULL COMMENT '最小销售包装单位价格',\r\n" + 
        		"  `purchase_pack_quantity` bigint  NOT NULL COMMENT '采购数量（最小销售包装单位）',\r\n" + 
        		"  `dosage_price` decimal(10,2)  NOT NULL COMMENT '最小制剂单位价格',\r\n" + 
        		"  `purchase_dosage_quantity` bigint  NOT NULL COMMENT '采购数量（最小制剂单位）',\r\n" + 
        		"  `organization_name` varchar(64)  NOT NULL COMMENT '组织机构名称',\r\n" + 
        		"  `state` int NULL COMMENT '状态',\r\n" + 
        		"  `deleted` boolean NULL COMMENT '删除标识',\r\n" + 
        		"  `create_by` bigint NULL COMMENT '创建人',\r\n" + 
        		"  `create_time` datetime NULL COMMENT '创建时间',\r\n" + 
        		"  `update_by` bigint NULL COMMENT '修改人',\r\n" + 
        		"  `update_time` datetime  NOT NULL COMMENT '修改时间',\r\n" + 
        		"  `business_time` datetime  NOT NULL COMMENT '业务时间'\r\n" + 
        		") ENGINE=OLAP \r\n" + 
        		"UNIQUE KEY(`id`) \r\n" + 
        		"COMMENT '医疗卫生机构药品采购情况' \r\n" + 
        		"DISTRIBUTED BY HASH(`id`) BUCKETS 10 \r\n" + 
        		"PROPERTIES ( \r\n" + 
        		"\"replication_allocation\" = \"tag.location.default: 1\", \r\n" + 
        		"\"is_being_synced\" = \"false\", \r\n" + 
        		"\"storage_format\" = \"V2\", \r\n" + 
        		"\"light_schema_change\" = \"true\", \r\n" + 
        		"\"disable_auto_compaction\" = \"false\", \r\n" + 
        		"\"enable_single_replica_compaction\" = \"false\");\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"\r\n" + 
        		"";
        String modifiedSql = processSql(inputSql);
        String filePath = "D:\\ygt_db.txt";
        
        try {
            Files.write(Paths.get(filePath), modifiedSql.getBytes());
            System.out.println("写入成功！");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    private static String processSql(String sql) {
        StringBuilder result = new StringBuilder();
        String regex = "\\d+"; // 正则表达式，匹配一个或多个数字
        Pattern pattern = Pattern.compile(regex);
        
        String[] lines = sql.split("\n");
        for (String line : lines) {
            
            if (line.indexOf("varchar")>=0 && line.indexOf("_code")<0 && line.indexOf("_no") <0 && line.indexOf("_no") <0) {
            	Matcher matcher = pattern.matcher(line);
            	if(matcher.find()) {
            		int newLength = Integer.parseInt(matcher.group()); // 将找到的数字字符串转换为整数
            		String modified = matcher.replaceFirst(newLength*3+"");
                    result.append(modified).append("\n");
            	} 
                
            } else {
                // 非varchar行直接保留
                result.append(line).append("\n");
            }
        }
        
        return result.toString();
    }
}
